marcus Posted November 19, 2006 Share Posted November 19, 2006 [code]<? include('header.php'); ?><?php$hash = $_GET['hash'];$conf = $_GET['confirm'];$exit = $_GET['exit'];if($hash == $hash && $conf == yes && $exit == 1){ $checkconf = "SELECT * FROM `users` WHERE confkey='$hash'"; $ccres = mysql_query($checkconf); $cc2 = mysql_fetch_assoc($ccres); $ifconf = $cc2[confirm]; if($ifconf == 1){ echo "This account has already been confirmed"; } $checkhash = "SELECT * FROM users WHERE confkey='$hash'"; $checkhashresult = mysql_query($checkhash); if(mysql_num_rows($checkhashresult) > 0){ $update = "UPDATE users SET confirm = '1' WHERE confkey='$hash'"; $upres = mysql_query($sql); echo "Your account has been confirmed!<br><br>$hash"; } }else{ echo "You are in the wrong place!"; }?><? include('footer.php'); ?>[/code]Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/neoblob/public_html/cms/confirm.php on line 12Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/neoblob/public_html/cms/confirm.php on line 22The errors happen when the hash, confirm and exit are present. Quote Link to comment Share on other sites More sharing options...
printf Posted November 19, 2006 Share Posted November 19, 2006 Where is your connect and select db functions?[code]mysql_connect ( 'localhost', 'user', 'pass' );mysql_select_db ( 'database_name' );[/code]printf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.