Maison >développement back-end >tutoriel php >PHP 表单传递参数与获取参数有关问题
PHP 表单传递参数与获取参数问题
<html><br /><head><title>Register</title></head><br /><body><br /> <?php<br /> if (!isset($_POST['register1']) || ( $_POST['register1'] != 'Register'))<br /> {<br /> #echo "test1";<br /> ?><br /> <h1>Registration</h1><br /> <form method = "post" action = "register.php"><br /> <table><br /> <tr><td>E-mail address:</td><br /> <td><input type='text' name = 'email'/></td><br /> </tr><br /> <tr><td>First Name:</td><br /> <td><input type = 'text' name = 'first_name'/></td><br /> </tr><br /> <tr><td>Last Name:</td><br /> <td><input type = 'text' name = 'last_name'/></td><br /> </tr><br /> <tr><td>PassWord:</td><br /> <td><input type = 'password' name = 'password'/></td><br /> </tr><br /><br /> <tr><br /> <td colspan = '2'><br /> <input type = 'submit' name = 'register1' value = 'Register'/><br /> </td><br /> </tr><br /> </table><br /> </form><br /> <?php<br /> }<br /> else<br /> {<br /> ?><br /> E-mail:<br /> <?php <br /> echo $_POST['email']; <br /> ?><br /> <br /><br /> Name:<br /> <?php <br /> echo $_POST['last_name']; <br /> ?><br /> <br /><br /> Password:<br /> <?php <br /> echo $_POST['password']; <br /> ?><br /> <?php<br /> }<br /> ?><br /></body><br /></html>
<br><title>Register</title><br><br> <?php <br /> if (!isset($_POST['register1']) <br><font color="#FF8000">------解决方案--------------------</font><br> ( $_POST['register1'] != 'Register'))<br> {<br> #echo "test1";<br> ?><br> <h1>Registration</h1><br>