Jump to content

Archived

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

bob2006

NOt pulling the info form the databass

Recommended Posts

$check=mysql_query("SELECT * FROM `admin` WHERE userid = '$id'")or die(mysql_error()); $Numb=mysql_num_rows($check);

if($CNumb == '1')  {
echo("<a href='http://www.freehosting.citrushostingplus.com/admin/?sid=$sid'>Go back</a> username is taken!");
}

Share this post


Link to post
Share on other sites
Try this...

[code=php:0]
$query = "SELECT * FROM admin WHERE userid = '$id'";
$result = mysql_query($query);
if (!$result){
  die('Could run query: ' .mysql_error());
}
 
if(mysql_fetch_row($result)){ // We're only expecting one row, so mysql_fetch_row should be fine
  echo '<a href="form.php">Go back</a> username is taken!
}
[/code]

Regards
Rich

Share this post


Link to post
Share on other sites

×

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.