Hi! I was wondering if someone could help out with this very stupid and probably very obvious problem I am having.
After a user registers they pay with paypal and come back to the same page on the site and I added this “if statement” to try and update my “users” table so that the “activated” and “IsPaid” field will change from “0” to “1” and thereafter allow the user to be able to login.
[php]if($status == ‘Completed’ || $status == ‘Pending’)
{
$activate = mysql_query(“UPDATE users SET activated=1, IsPaid=1 WHERE id=’”.$_SESSION[‘lastid’]."’");
header (‘location: http://www.trecertificationenrollment.com/toactivate.php’);
ob_end_flush();
die();
}[/php]
This code is not working. Can anybody help me and tell me what I am doing wrong?
thank you