Hi there.
My form refuses to update the record - Im using this :
// get the variables from the URL request string
$offer_id = $_REQUEST['offer_id'];
$description = $_REQUEST['description'];
$benefits = $_REQUEST['benefits'];
$uses = $_REQUEST['uses'];
//Allow ' to be used in submitted data
$description = addslashes($description);
$benefits = addslashes($benefits);
$uses = addslashes($uses);
// if $id is defined, update the old entry
if( $offer_id )
{
$query = "UPDATE teainfo SET description='$description', benefits='$benefits',
uses='$uses' WHERE offer_id='$offer_id'";
}
// save the info to the database
$results = mysql_query( $query );
Instead of updating the record where offer_id matches it creates a new record using the submitted data with the offer_id left blank.
My table looks like
offer_id | description | taste | uses | benefits | prep1 | prep2 | teatyoe | imglarge |imagemacro | thumbs
any ideas??