Check if username already exists in database MySQL PHP

后端 未结 4 971
情深已故
情深已故 2020-12-11 11:51

I have a registration.php page I made and I need to check if a username is already in my database so that I won\'t have 2 members with the same name...

Here is how I

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-11 12:57

    create a unique key on UserName and if the INSERT errors out, check the error number.

提交回复
热议问题