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!"); } Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
bob2006 Posted September 8, 2006 Author Share Posted September 8, 2006 thanks it help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.