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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.