please i am having this error, i am trying to create a login page , but once you register it sends the email to the registered email
once the link is clicked it says the account is acitatvated but with this message below
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/reachea2/public_html/activate.php on line 11
<?php
include 'include/global.php';
$code = $_GET['code'];
if (!$code)
echo "No code supplied";
else
{
$check = mysql_query("SELECT * FROM users WHERE code='$code' AND active='1'");
if (mysql_num_rows($check)==1)
echo "You have already activated your account";
else
{
$activate = mysql_query("UPDATE users SET active='1' WHERE code='$code'");
echo "Your account has been activated!";
}
}
?>