bob2006 Posted September 8, 2006 Share Posted September 8, 2006 $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!"); } Link to comment https://forums.phpfreaks.com/topic/20142-not-pulling-the-info-form-the-databass/ Share on other sites More sharing options...
HuggieBear Posted September 8, 2006 Share Posted September 8, 2006 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]RegardsRich Link to comment https://forums.phpfreaks.com/topic/20142-not-pulling-the-info-form-the-databass/#findComment-88541 Share on other sites More sharing options...
bob2006 Posted September 8, 2006 Author Share Posted September 8, 2006 thanks it help Link to comment https://forums.phpfreaks.com/topic/20142-not-pulling-the-info-form-the-databass/#findComment-88564 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.