How can I update multiple columns in the table? It doesnt change the data in the database.
<?php
$id = $_GET['user'];
$any = mysql_query("SELECT * FROM function WHERE id='".$id ."'");
if ($edit = mysql_fetch_assoc($any)){
?>
//this is the form for the input type when updating the column
<form action="reserve_event.php" method="POST">
<input type="text" name="fh" value="<?php echo $edit['fh'];?>">
<input type="text" name="package" value="<?php echo $edit['package'];?>">
<input type="text" name="guest" value="<?php echo $edit['guest'];?>">
<input type="text" name="fee" value="<?php echo $edit['fee'];?>">
<input type="text" name="status" value="<?php echo $edit['status'];?>">
<input type="submit" name="submit" value="submit">
</form>
//this part is when i submit the data.
<?php
}
if(isset($_POST['submit'])){
$fh= $_POST["fh"];
$package= $_POST["package"];
$guest= $_POST["guest"];
$fee = $_POST["fee"];
$status= $_POST["status"];
$sql1 = mysql_query("UPDATE function SET fh='".$fh."',package= '".$package."', guest = '".$guest."',fee = '".$fee."',status= '".$status."' WHERE id='".$id."'");
}
?>