I'm having a problem with an ezine script. I wrote the script so that it sends confirmation emails along with a customized confirmation url that they can go to to confirm. The script simply changes "0" to "1". The url I am using is
http://www.mysite.com/confirm.php?code=m3ny4t36
confirm.php contains:
<?
include("/config.php");
?>
<?
if(isset($_GET[code])) {
if(mysql_query("SELECT * FROM "maileremail" WHERE code='"$_GET[code]"'")) {
mysql_query("UPDATE "maileremail" SET active = '1' WHERE code = '"$code"'");
echo "Thank you for confirming, you are now added to the list";
} else {
echo "You have the wrong code or id, please double check";
}
} else {
echo "Please use the link in email to confirm your subscription";
}
break;
?>
I probably just made a simple mistake as I am new to php but if anyone could check the code out and see what's wrong, I would appreciate it.