Hello!
I try to make a registration form. When user post the fields, i check USER_NAME. If exist then no inster the row to MYSQL.
After post:
$check = "SELECT name FROM test WHERE name='".$_POST['user_name']."';
$result = mysql_query($check) or die (mysql_error());
$numrows = mysql_num_rows($resutl);
if ($numrow != 0){
echo "exist"; exit;
}else{
insert.....
}
In the database i have a row with user_name=Test
If the posted value is Test, then ok, but if i post "test" or "TeSt" or something else, then the row iserted.
How can make it case insensitive? I think i should use str to lowercase to the posted value, but in the query..how can i do that?
Thank you