PHP & MySQL username submit problem

后端 未结 2 1085
迷失自我
迷失自我 2021-01-29 00:51

I want to allow users to either have there username field empty at any time but I get the username error message Your username is unavailable! how can I correct thi

2条回答
  •  情深已故
    2021-01-29 01:01

    if(isset($_POST['username']) && trim($_POST['username'])!=='') {
    

    Otherwise, $_POST['username'] will be set even if the form is submitted with an empty field.

提交回复
热议问题