Jump to content

mysql_fetch_assoc(); + mysql_num_rows(); help needed


marcus

Recommended Posts

[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 12

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/neoblob/public_html/cms/confirm.php on line 22

The errors happen when the hash, confirm and exit are present.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.