Originally Posted by Jian0203
But I need to alert the user that the username is existed. So, the user can register again. How should i do this ?
Check mysql_num_rows() (or similar for mysqli / prepared statements) to see if there was a row inserted. If 1 then the user was registered. If 0 then there was already a user with that name.
My helpful sig has gone because a mod below the administrator gave me an infraction - despite the administrator personally agreeing to it.
If you need any php tips or tricks you can PM me.