tritus Posted September 10, 2007 Share Posted September 10, 2007 hey when it sends the link in email and i goto the link its not verifying the verification code.. cant find out whats wrong but my error msg is Your account could not be activated. Please re-check the link or contact the system administrator. <?php if (isset($_GET['x'])) { $x = (int) $_GET['x']; } else { $x = 0; } if (isset($_GET['y'])) { $y = $_GET['y']; } else { $y = 0; } if ( ($x> 0) && (strlen($y) == 32)) { require_once ('mysql_connect.php'); $query = "UPDATE users SET active=NULL WHERE (user_id=$x AND active='" . $y . "') LIMIT 1"; $result = mysql_query($query); if (mysql_affected_rows() == 1) { echo "<h3>Your account is now active. You may now log in.</h3>"; } else { echo '<p><font color="red" size="+1">Your account could not be activated. Please re-check the link or contact the system administrator.</font></p>'; } mysql_close(); } else { echo '<b>Activation link not valid!</b>'; } ?> \ Link to comment https://forums.phpfreaks.com/topic/68638-need-help-with-activation-script/ Share on other sites More sharing options...
prodigy2k7 Posted September 10, 2007 Share Posted September 10, 2007 I am a novice but try not using $_GET['y'] all the time... Set a variable at the top like $get_y = $_GET['y']; then use $get_y in ur scripts. See if that helps, if not sorry Edit: I mean immedieatly when the script starts.... IE: <?php $vary = $_GET['x']; if (isset($vary)) { Link to comment https://forums.phpfreaks.com/topic/68638-need-help-with-activation-script/#findComment-345038 Share on other sites More sharing options...
tritus Posted September 10, 2007 Author Share Posted September 10, 2007 nope didnt work :-\ Link to comment https://forums.phpfreaks.com/topic/68638-need-help-with-activation-script/#findComment-345041 Share on other sites More sharing options...
teng84 Posted September 10, 2007 Share Posted September 10, 2007 add a die to seee where you went wrong or echo your query to see your sql statement if correct? Link to comment https://forums.phpfreaks.com/topic/68638-need-help-with-activation-script/#findComment-345067 Share on other sites More sharing options...
AdRock Posted September 10, 2007 Share Posted September 10, 2007 If you want to validate a users email address look here http://www.devarticles.com/c/a/PHP/Creating-a-Membership-System/1/ Link to comment https://forums.phpfreaks.com/topic/68638-need-help-with-activation-script/#findComment-345085 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.