I know this topic comes up often and I searched, but couldn't seem to find my problem.
I have a page and when you push the update button it goes to this script:
<?
$dbh=mysql_connect ("localhost", "****", "****")
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("vector2_events");
if (!mysql_select_db("vector2_events"))
exit("Unable to select the database");
$sqlquery = "UPDATE `events_yxh` SET
`event_title` = '$event_title'
`event_startdate` = '$event_startdate'
`event_enddate` = '$event_enddate'
`event_time` = '$event_time'
`event_venue` = '$event_venue'
`event_contact` = '$event_contact'
`event_fax` = '$event_fax'
`event_phone` = '$event_phone'
`event_website` = '$event_website'
`event_email` = '$event_email'
`event_location` = '$event_location'
`event_description` = '$event_description'
`event_publish` = '$event_publish'
WHERE `event_id` = '$event_id'" ;
$results = mysql_query($sqlquery);
mysql_close();
echo $sqlquery;
?>
I added the echo $sqlquery to make sure all the variables were being passed and they are. However the record never gets updated. Where have I gone wrong? Many thanks for reading.