且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP& MySQL用户名提交问题

更新时间:2023-01-29 20:13:08

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

否则,即使提交的表单具有空字段,也会设置$ _POST ['username'].

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