I ve problem to update record after insert record.Cannot edit the record.Please help me to overcome this problem.May be there is problem with this codes.
codes – update
[code=php]
<?
include ‘dbase.php’;
$programmename=$_POST[“programmename”];
$location=$_POST[“location”];
$cohort=$_POST[“cohort”];
$organizer=$_POST[“organizer”];
$date=$_POST[“date”];
$time=$_POST[“time”];
$attendance=$_POST[“attendance”];
$consultant=$_POST[“consultant”];
$fees=$_POST[“fees”];
$budget=$_POST[“budget”];
$id=$_POST[“id”];
$query = “UPDATE program SET programmeName=’$programmename’, location=’$location’, cohort=’$cohort’,
organizer=’$organizer’, date=’$date’, time=’$time’ , attendance=’$attendance’, consultant=’$consultant’,
fees=’$fees’, budget=’$budget’, WHERE id=’$id'”;
$result=mysql_db_query($dbname,$query) or die(mysql_error());
if($result){
header(“Location:rekodprogram.php”);
}
?>