Hi,
I'm trying to update a table based on input from a previous page's form. The update page gets the form variables from $_POST and assigns them to $lastname, $firstname, etc.
The page echoes these variables correctly, so I know they are being passed from the form page correctly, but the table never gets updated, so I think there's something wrong with my UPDATE statement's syntax. What am I missing?
Code:
$query = "UPDATE 2010JVSummerRoster SET `lastname`='.$lastname.',`firstname`='.$firstname.',`homephone`='.$homephone.',`cellphone`='.$cellphone.',`year`='.$year.',`position`='.$position.',`number`='.$number.' WHERE `id`='.$id.'";
mysql_query($query);
Thanks!
|