解析错误:语法错误,第67行的C:\ wamp \ www.hPROJECT \y1.php中的意外文件结束 [英] Parse error: syntax error, unexpected end of file in C:\wamp\www\PROJECT\y1.php on line 67

查看:86
本文介绍了解析错误:语法错误,第67行的C:\ wamp \ www.hPROJECT \y1.php中的意外文件结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何删除以下错误:解析错误:语法错误,第67行的C:\ wamp \\\\ PROJECT \ y1.1.pp中意外的文件结尾



来自以下代码:



< html>

< head>< / head>

< body>



需要y_conn.php;

extract($ _GET);

$ errorCount = 0;



$ Name = validateInput($ _ POST ['name'],Name);

$ Password = validateInput($ _ POST [ 'password'],Passowrd);

$ Password1 = validateInput($ _ POST ['password1'],确认Passowrd);

$ Email = validateInput( $ _POST ['电子邮件'],电子邮件);

if($ errorCount> 0){

echo请重新输入以下信息。
\ n;

redisplayForm($ Name,$ Password,$ Password1,$ Email);}

else

echo感谢您填写表格;





功能displayRequired($ fieldName){

echo字段\$ fieldName \是必需的。
;

}



函数validateInput($ data ,$ fieldName){

global $ errorCount;

if(empty($ data)){

displayRequired($ fieldName);

++ $ errorCount;

$ retval =; }

else {//只清理输入,如果它不是空的

$ retval = trim($ data);

$ retval = stripslashes($ retval);

}

返回($ retval);

}



函数redisplayForm($ name,$ password,$ password1,$ email){

?>









< form method =getaction = y1.php>






< th>< input type =textname =name/> < tr> < tr> < TR>
姓名:
密码: <输入type =passwordname =password/>
确认密码: < input type =password name =password1>
电子邮件: < input type =textname =e-mail/>
年龄: < input type =textname =age/>
< input type =submitvalue =Done/> < input type =resetvalue =reset/>


< / form>





$ q11 =SELECT * from`reg` ORDER BY`id`;

$ q11_run = mysql_query($ q11)或die(mysql_error());



$ q12 =INSERT INTO`reg`(姓名,密码,密码,电子邮件,年龄)

VALUES($ name) ,$密码,$ password1,$ e-mail,$ age);



?>





< / body>

< / html>

How to remove the following error: Parse error: syntax error, unexpected end of file in C:\wamp\www\PROJECT\y1.php on line 67

from the following code:

<html>
<head></head>
<body>

require "y_conn.php";
extract ($_GET);
$errorCount = 0;

$Name = validateInput($_POST['name'], "Name");
$Password = validateInput($_POST['password'], "Passowrd");
$Password1= validateInput($_POST['password1'], "Confirm Passowrd");
$Email= validateInput($_POST['e-mail'], "E-mail");
if ($errorCount>0){
echo "Please re-enter the information below.
\n";
redisplayForm($Name, $Password, $Password1, $Email);}
else
echo "Thank you for filling out the form";


function displayRequired($fieldName) {
echo "The field \"$fieldName\" is required.
";
}

function validateInput($data, $fieldName) {
global $errorCount;
if (empty($data)) {
displayRequired($fieldName);
++$errorCount;
$retval = ""; }
else { // Only clean up the input if it isn't empty
$retval = trim($data);
$retval = stripslashes($retval);
}
return($retval);
}

function redisplayForm($name, $password, $password1, $email) {
?>





<form method="get" action="y1.php">




Name:<input type="text" name="name" />
Password:<input type="password" name="password" />
Confirm Password:<input type="password" name="password1">
E-mail:<input type="text" name="e-mail" />
Age:<input type="text"name="age" />
<input type="submit" value="Done" /><input type="reset" value="reset" />

</form>


$q11= "SELECT * from `reg` ORDER BY `id`";
$q11_run= mysql_query($q11) or die(mysql_error());

$q12= "INSERT INTO `reg` (name,password,con. password,email,age)
VALUES ($name,$password,$password1,$e-mail,$age)";

?>


</body>
</html>

推荐答案

_GET);
_GET);


errorCount = 0;


errorCount = 0;


Name = validateInput(
Name = validateInput(


这篇关于解析错误:语法错误,第67行的C:\ wamp \ www.hPROJECT \y1.php中的意外文件结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆