Hello
I have 2 forms, form1 which passes values to form2 and inserts a record in mysql db. The code for form1 works. form2 is supposed to update that record in the db, on submit. This code I have put in a 3rd thanku page, with also echo for form values. The echo is working correctly, i.e. all values from form2 are passed to thanku page. But the record in db is not updating.

Added line breaks for readability.
Here is the code for form2 on thanku page:
This is the thanku page after the form2 submits:
But when I check the db, the record is not updated with these values.
Please help me.
Thanks
I have 2 forms, form1 which passes values to form2 and inserts a record in mysql db. The code for form1 works. form2 is supposed to update that record in the db, on submit. This code I have put in a 3rd thanku page, with also echo for form values. The echo is working correctly, i.e. all values from form2 are passed to thanku page. But the record in db is not updating.
Added line breaks for readability.
Here is the code for form2 on thanku page:
PHP:
<?PHP
echo($_POST['fname'].'<br>'.$_POST['phone'].'<br>'.
$_POST['email'].'<br>'.$_POST['lname'].'<br>'.
$_POST['address'].'<br>'.$_POST['city'].'<br>'.
$_POST['state'].'<br>'.$_POST['zipcode']);
If (isset($_POST['submit'])) {
require('config.php');
require('functions.php');
connect_database();
$NowTime = NOW();
$logincount = $logincount+1;
$UpdateRecords ="UPDATE signup SET
lname='". $_POST['lname'] ."' ,address='". $_POST['address'] ."',
city='". $_POST['city'] ."',state='". $_POST['state'] ."',
zipcode='". $_POST['zipcode']."',
confirmkey='$phone',lastlogin='$NowTime',
logincount='$logincount' where email='$email'";
$UpdateResult = mysql_query($UpdateRecords) or die(mysql_error());
}
?>
This is the thanku page after the form2 submits:
Code:
tasneem
1234561234
[email][email protected][/email]
ranggg
1500 Market St
Burlingame
CA
19102
Thank you tasneem for joining Us.
Please remember the charge on your credit card will appear from XXX, Inc.,the parent company.
We will be contacting you shortly with your password and log in information.
If you have any questions about your membership contact us at our email.
Go to Home
But when I check the db, the record is not updated with these values.
Please help me.
Thanks














