UPDATING record in mySQL. PLEASE HELP
Posted 21 August 2006 - 01:39 PM
Update.php appears to expect to get the information to be updated from a POST array ... but I don't see any POSTed form action anywhere in the code. I do see a link equivalent to update.php?id=something (which isn't going to place any information in a POSTed array). All edit.php does is display the information.
Perhaps it would be helpful to post the current version of update.php and the current version of 'whatever it is' that is linked to update.php so we can focus on complete scripts rather than attempt to follow the various script changes suggested piecemeal in the thread.
Posted 21 August 2006 - 05:18 PM
Add an extra line to the form in update.php so that the record ID gets POSTed:
<input type="hidden" name="id" value="<?php echo $id;?>"/>
Posted 21 August 2006 - 05:33 PM
i dnt know how to thank you mate.
Posted 21 August 2006 - 06:09 PM
$query = " .... whatever the query is ..."; echo $query; // nice to know what's happening
Also, learn to make better use of error trapping with code like this:
$query = " .... whatever the query is ..."; $result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query);
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users