PHP 表单传递参数与获取参数有关问题

WBOY
Release: 2016-06-13 12:02:33
Original
860 people have browsed it

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>
Copy after login


初学 PHP 问个问题 在这里 获取
E-mail:
echo $_POST['email']; 
?>


Name:


Password:

这些信息时 只输出一个没问题 
当我输出多个的时候像这个样子的
E-mail:
echo $_POST['email']; 
?>


Name:
echo $_POST['last_name']; 
?>


Password:
echo $_POST['password']; 
?>
他就出错了 - -!!!
总是出现
An error occurred.

Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.
这个东西 只输出一个时就可以
各位大神请指教 
------解决方案--------------------

<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>    
Copy after login

        
            
                
            
            
                
            
            
                
            
            
                
            
 
            
                
E-mail address:
First Name:
Last Name:
PassWord:

                    
                
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template