I have a username check in PHP, and whenever someone enters the value 'username2' when 'username' already exists, it returns that it is already taken.
include 'connect.php';
$username = $_POST['r_username'];
$password = $_POST['r_password'];
$email = $_POST['r_email'];
$qry = "SELECT * FROM users WHERE 'username' = '$username'";
if(mysql_query($qry) != ''){
echo "<script type='text/javascript'>
alert('This username has already been taken!');
window.location = 'register.php';
</script>";
}else{...
Thanks for your help!