I am having a problem with my account activation link readout section of my code and seriously do not know what I am doing wrong. I hope you guys can see the error, i tried to circle it as close as possible, first the code:
//Check if activation link is entered
if (isset($_GET['userid'])) {
if(isset($_GET['email'])) {
if(isset($_GET['activationcode'])) {
$userid = $_GET['userid'];
$email = $_GET['email'];
$activcode = $_GET['activationcode'];
$request = mysql_query("SELECT * FROM login_table WHERE user_name = '" . $userid . "' AND user_email = '" . $email . "';");
$row = mysql_fetch_object($request) or die( mysql_error() );
$lname = $row->user_lname;
$elname = md5('ajanxistubiar56892'. $lname);
$id = $row->userid;
/*
if($activcode == $elname) {
$activquery = "UPDATE `login_table` SET `user_level` = '1' WHERE `userid` = " . $id . " LIMIT 1;";
mysql_query($cactivquery) or die( mysql_error() );
echo "<center><font color=\"green\">Your Activation is now complete, you may login now!</font></center>";
} else {
echo "<center><font color=\"red\">The Activationcode is invalid!</font></center>";
}*/
echo "<br><br><br>";
include("" . $absolute_path . "/elements/footer.php");
exit();
}
} else {
echo "<font color=\"red\"><u>Error:</u> Invalid Activation Link</p>";
include("" . $absolute_path . "/elements/footer.php");
exit();
}
}
But the line
$row = mysql_fetch_object($request) or die( mysql_error() );
still makes the code underneath the line not be executed (i know since the footer is not displayed anymore).
When I outcomment that line the footer is there again.
Do you still see any error, i can't figure it out.
Thanks for help
greetz
max