我刚开始使用 PHP,我想知道如何解决这个解析错误。这是错误:
Parse error: parse error in E:\wamp\www\PHP\create.php on line 22
这是我的代码。顺便说一句,我正在制作一个数据库操作系统,我使用 WampServer 和 Dreamweaver。
<?php
include 'E:\wamp\www\PHP\connection.php';
$IDNUMBER = $_POST['ID'];
$LNAME = $_POST['Lname'];
$FNAME = $_POST['Fname'];
$MNAME = $_POST['Mname'];
$GRADEYR = $_POST['GradeYr'];
$ADDRESS = $_POST['Address'];
if (!$_POST['submit']) {
echo "please fill out the form";
header('Location: E:\wamp\www\PHP\main.php');
} else {
mysql_query = "INSERT INTO students (`IDNUMBER`,`LNAME` ,`FNAME` ,`MNAME` ,`GRADEYR` ,`ADDRESS`)
VALUES (NULL, '$IDNUMBER', '$LNAME', '$FNAME', '$MNAME', '$GRADEYR', '$ADDRESS')") or die(mysql_error());
echo "User has been added!";
header('E:\wamp\www\PHP\main.php');
}
?>