View Single Post
Old 02-08-2003, 07:17 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,529
sde is on a distinguished road
PHP Code:
<?
$username
="trevor";

$result=mysql_query("select * from users where username='$username'");

$num=mysql_numrows($result);

if(
$num 0) {
  echo 
"sorry, that username already exists.";
}
else {
  
// do registration here
}
?>
that query should not be case sensitive .. so if it returns any more than 0 results, .. there is a 'Trevor' or 'trevor' already existing in your system.
sde is offline   Reply With Quote