This is my second topic tonight, but it's only because I can't really find any helpful information in regards to updating data in SQL using php. For some reason this won't update. If anyone has any suggestions that would be great :), again sorry for asking another question, I'm just eager to learn from my mistakes.
HTML Section:
<html>
<head>
<title>Update Data</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<form action="editphpscript.php" method="post">
ID To Update: <input type="text" name="id" required><br><br>
New Status: <select name="status" required>
<option>Status</option>
<option value="Assigned">Assigned</option>
<option value="Pending">Pending</option>
<option value="No_Signal">No Signal</option>
<option value="Installed">Installed</option>
</select>
<input type="submit" name="update" value="Update Data">
</form>
</body>
</html>
PHP Section
<?php
// php code to Update data from mysql database Table
if(isset($_POST['update']))
{
$hostname = "";
$username = "";
$password = "";
$databaseName = "";
$connect = mysqli_connect($hostname, $username, $password, $databaseName);
// get values form input text and number
$id = $_POST['id'];
$status = $_POST['status'];
// mysql query to Update data
$query = "UPDATE `leadlist` SET `status`='".$status." WHERE `id` = $id";
$result = mysqli_query($connect, $query){
($result){
echo 'Data Updated';
}else{
echo 'Data Not Updated';
}
mysqli_close($connect);
}
?>