我一直在尝试使用 php 将数据插入 mysql 但收到此错误 Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE ...
这是我的插入文件
<?php
include_once 'include.php';
include_once 'header.php';
//$dbhandle = mysql_connect($hostname, $DBUser, $DBPasswd)
// or die("Unable to connect to MySQL");
//echo "Connected to MySQL<br>";
$DBsubmit="INSERT INTO User (fname, lname, email, password, institution, expertise)
VALUES('$_POST['fname']', '$_POST['lname']', '$_POST['email']', '$_POST['password']', '$_POST['institution']', '$_POST['expertise']')";
$result=mysql_query($DBsubmit)
//echo "1 record added";
// close connection
mysql_close();
?>