Rumah >pembangunan bahagian belakang >tutorial php >PHP 表单传递参数与获取参数问题
<html><head><title>Register</title></head><body> <?php if (!isset($_POST['register1']) || ( $_POST['register1'] != 'Register')) { #echo "test1"; ?> <h1>Registration</h1> <form method = "post" action = "register.php"> <table> <tr><td>E-mail address:</td> <td><input type='text' name = 'email'/></td> </tr> <tr><td>First Name:</td> <td><input type = 'text' name = 'first_name'/></td> </tr> <tr><td>Last Name:</td> <td><input type = 'text' name = 'last_name'/></td> </tr> <tr><td>PassWord:</td> <td><input type = 'password' name = 'password'/></td> </tr> <tr> <td colspan = '2'> <input type = 'submit' name = 'register1' value = 'Register'/> </td> </tr> </table> </form> <?php } else { ?> E-mail: <?php echo $_POST['email']; ?> <br /> Name: <?php echo $_POST['last_name']; ?> <br /> Password: <?php echo $_POST['password']; ?> <?php } ?></body></html>
SF 不留
<html><head><title>Register</title></head><body> <?php if (!isset($_POST['register1']) || ( $_POST['register1'] != 'Register')) { #echo "test1"; ?> <h1>Registration</h1> <form method = "post" action = ""> <table> <tr><td>E-mail address:</td> <td><input type='text' name = 'email'/></td> </tr> <tr><td>First Name:</td> <td><input type = 'text' name = 'first_name'/></td> </tr> <tr><td>Last Name:</td> <td><input type = 'text' name = 'last_name'/></td> </tr> <tr><td>PassWord:</td> <td><input type = 'password' name = 'password'/></td> </tr> <tr> <td colspan = '2'> <input type = 'submit' name = 'register1' value = 'Register'/> </td> </tr> </table> </form> <?php } else { ?> E-mail: <?php echo $_POST['email']; ?> <br /> Name: <?php echo $_POST['first_name'].$_POST['last_name']; ?> <br /> Password: <?php echo $_POST['password']; ?> <?php } ?></body></html>
<html><head><title>Register</title></head><body> <?php if (!isset($_POST['register1']) || ( $_POST['register1'] != 'Register')) { #echo "test1"; ?> <h1>Registration</h1> <form method = "post" action = ""> <table> <tr><td>E-mail address:</td> <td><input type='text' name = 'email'/></td> </tr> <tr><td>First Name:</td> <td><input type = 'text' name = 'first_name'/></td> </tr> <tr><td>Last Name:</td> <td><input type = 'text' name = 'last_name'/></td> </tr> <tr><td>PassWord:</td> <td><input type = 'password' name = 'password'/></td> </tr> <tr> <td colspan = '2'> <input type = 'submit' name = 'register1' value = 'Register'/> </td> </tr> </table> </form> <?php } else { ?> E-mail: <?php echo $_POST['email']; ?> <br /> Name: <?php echo $_POST['first_name'].$_POST['last_name']; ?> <br /> Password: <?php echo $_POST['password']; ?> <?php } ?></body></html>
<form method = "post" action = "">
<form method = "post" action = "">
print_r($_POST);
看看是什么
print_r($_POST);
看看是什么
???,?有??。
你既然能print_r出?。表示可以?取到的。
???,?有??。
你既然能print_r出?。表示可以?取到的。
你这个应该是服务器的问题吧,代码获取没有什么问题。
检查一下错误日志看报什么错误。PHP的错误提示功能也打开试试。
你这个应该是服务器的问题吧,代码获取没有什么问题。
检查一下错误日志看报什么错误。PHP的错误提示功能也打开试试。
错误级别 的问题~你的错误级别的什么?
错误级别 的问题~你的错误级别的什么?
从nginx中找到这个日志
2014/07/18 20:37:33 [error] 9397#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 118.199.7.180, server: localhost, request: "POST /zp/chapter5/register.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost", referrer: "http://localhost/zp/chapter5/register.php"
大神给分析下 是什么问题
从nginx中找到这个日志
2014/07/18 20:37:33 [error] 9397#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 118.199.7.180, server: localhost, request: "POST /zp/chapter5/register.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost", referrer: "http://localhost/zp/chapter5/register.php"
大神给分析下 是什么问题
试了各种方法 暂时没有找到解决办法 结贴了