0
我正在與PHP和MySQL(PHPMyAdmin中)一個註冊表格,當我打開瀏覽器(Mozilla Firefox瀏覽器)的頁面,我得到
Parse error: syntax error, unexpected $end in line 71
<?php
require('config.php');
if(isset($_POST['submit'])){
//Verificació
$email1 = $_POST['email1'];
$email2 = $_POST['email2'];
$pass1 = $_POST['pass1'];
$pass2 = $_POST['pass2'];
if($email1 == $email2){
if ($pass1 == $pass2){
//Tot bé!
$name = mysql_escape_string($_POST['name']);
$lname = mysql_escape_string($_POST['lname']);
$email1 = mysql_escape_string($email1);
$email2 = mysql_escape_string($email2);
$pass1 = mysql_escape_string($pass1);
$pass2 = mysql_escape_string($pass2);
}else{
die("Sorry, your passwords didn't match");
}
}else{
die("Sorry, your emails didn't match");
}
}else{
echo <<<EOD
<form action='register.php' method='POST'>
First name:<input type='text' name='name' /><br/>
Last name:<input type='text' name='lName' /><br/>
Username:<input type='text' name='username' /><br/>
Email:<input type='text' name='email' /><br/>
Password:<input type='password' name='pass1' /><br/>
Confirm password:<input type='password' name='pass2' /><br/>
<input type='submit' value='Register' name='submit' />
</form>
EOD;
}
?>
我在做什麼不好?有人能幫助我嗎?