I have code when user clicks on link in his email and activates account.
error is:
Line 25 is: while ($row = mysql_fetch_array($result)) and all code:PHP Code:Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in activationuser.php on line 25
I have to redirect user to index.php page if he clicks twice on link in his e-mail. So, only once can be pressed on link.PHP Code:$query = "SELECT * FROM membership WHERE activationnum = '$accountnum'";
while ($row = mysql_fetch_array($result))
{ $activation = $row["activation"];
if ($activation==1)
{ echo "<script language='javascript'>
document.location='index.php';</script>"; }
else
{
$query = "UPDATE membership SET activation ='1'
WHERE activationnum = '$accountnum'";
$result= mysql_query ($query) or die ('Can not complete update');
}
}


Reply With Quote
Bookmarks