Miscellany
public text v1 · immutable #search the database for duplicate names
//$result = mysql_query("SELECT COUNT(*) FROM users WHERE username = ' ".$_POST['uname']." ' LIMIT 1");
$result = mysql_query("SELECT * FROM users WHERE username = ' ".$_POST['uname']." ' ") or die('Error Connecting to Database');
$check = mysql_num_rows($result);
if($check !== "0")
{
die('Sorry, the username: <strong>'.$_POST['uname'].'</strong> is already taken, please pick another one.');
} //end of if statement