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. Link to comment https://forums.phpfreaks.com/topic/27732-mysql_fetch_assoc-mysql_num_rows-help-needed/ 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 Link to comment https://forums.phpfreaks.com/topic/27732-mysql_fetch_assoc-mysql_num_rows-help-needed/#findComment-126842 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.