无法得到post过来的值 Username Password 初学php,为什么上面无法把name和password传到secret.php里,导致每次都输出Please input an effective username and password?//secret.php //Create short names for variables if($_POST['name']==''&&$_POST['password']=='') { //Visitor need to enter a name and password echo 'Please input an effective username and password'; } elseif($_POST['name']=='root'&&$_POST['password']=='123') { echo 'Welcome to the New World!'; } else { echo 'You are not welcome!'; }?>------解决方案-------------------- 需要为input控件增加name属性,只有这样,浏览器才会把值提交到服务器Username Password