prevent duplicated usernames with non-case-sensitive behavior in php/mysql -


The username of my website has been saved like robert and the interesting thing is that someone Name Robert (Capital R)

How do I stop them from repetitive usernames in any way?

My project is in MySQL / php

  if (mysql_num_rows (Mysql_query ("user_table WHERE user name =" $ user name "select username)) & gt; 0) {Die ("Duplicate user names can not be saved, this username is present.");}   

Also registered with this code Robert

In both cases, convert them both and then compare them as: / P>

Table WHERE LOWER (username) = Select user name from LOWER ('$ username')

Comments