dbldee Posted February 1, 2007 Share Posted February 1, 2007 <?php include($DOCUMENT_ROOT . '/vars.php'); include($DOCUMENT_ROOT . '/headfoot.php'); mysql_connect($db_host, $db_user, $db_passwd); mysql_select_db($db_name); if (!isset($ac) || !is_numeric($ac) || !isset($i) || !is_numeric($i)) { echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"1;URL=$self_url\"></head><body><span style=\"font-size:250%\">$title</span><br><span style=\"font-size:150%\">Failed to resolve activation code!</span></body></html>"); exit; } $res = mysql_query("select email from user where id=$i && ac=$ac"); if (mysql_num_rows($res) != 1) { echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"1;URL=$self_url\"></head><body><span style=\"font-size:250%\">$title</span><br><span style=\"font-size:150%\">Failed to resolve activation code!</span></body></html>"); exit; } $email = mysql_result($res, 0); $res = mysql_query("update user set ac=0 where id=$i"); uheader(); echo("<p align=center class=big>Your account was activated!</p>"); echo("<form action=/members/ method=post><input type=hidden name=form value=sent><div align=center><b>You may now log in:</b><br>"); echo("E-mail:<br><input type=text name=email size=10 maxlength=100 value=$email><br>Password:<br><input type=password name=passwd size=10 maxlength=20><br><input type=submit value=\"Log in\"></div></form>\n"); ufooter(); mysql_close; ?> Can someone help with the logic, I am new to Php and need some help It only returns the error :Failed to resolve activation code Another question? Is there utility for debugging php Scripts while they remain on the server? Link to comment https://forums.phpfreaks.com/topic/36640-email-account-actiavtion-script/ Share on other sites More sharing options...
AbydosGater Posted February 1, 2007 Share Posted February 1, 2007 Could you change the two error sections to include say error number one and two ie: if (!isset($ac) || !is_numeric($ac) || !isset($i) || !is_numeric($i)) { echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"1;URL=$self_url\"></head><body><span style=\"font-size:250%\">$title</span><br><span style=\"font-size:150%\">ERROR #1: Failed to resolve activation code!</span></body></html>"); exit; Just to help figure out where the program is failing! -Andy Link to comment https://forums.phpfreaks.com/topic/36640-email-account-actiavtion-script/#findComment-174630 Share on other sites More sharing options...
dbldee Posted February 1, 2007 Author Share Posted February 1, 2007 Thank so much for that Andy, I see warnings for Line 5,6,6,11,12 and failure Error#2 which would be the 2nd instance Link to comment https://forums.phpfreaks.com/topic/36640-email-account-actiavtion-script/#findComment-174655 Share on other sites More sharing options...
AbydosGater Posted February 1, 2007 Share Posted February 1, 2007 Hmm ok if its the second instance.. i would say that its a mysql error.. backup up that theory with your warning that are on the lines for the mysql functions.. What warnings are you getting.. and are you sure theres not more then one user with that email address? -Andy Link to comment https://forums.phpfreaks.com/topic/36640-email-account-actiavtion-script/#findComment-174687 Share on other sites More sharing options...
dbldee Posted February 1, 2007 Author Share Posted February 1, 2007 Seems to be mostly mySql errors http://www.ultratrafffichangout.com/activate.php?ac=3086&i=0 Link to comment https://forums.phpfreaks.com/topic/36640-email-account-actiavtion-script/#findComment-174703 Share on other sites More sharing options...
mjlogan Posted February 1, 2007 Share Posted February 1, 2007 those are database connection errors. check you have the connect setup correctly. Link to comment https://forums.phpfreaks.com/topic/36640-email-account-actiavtion-script/#findComment-174717 Share on other sites More sharing options...
AbydosGater Posted February 1, 2007 Share Posted February 1, 2007 yeah connection errors! -Andy Link to comment https://forums.phpfreaks.com/topic/36640-email-account-actiavtion-script/#findComment-174765 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.