Hello all. Ive got a simple form that i want to insert data into a MySQL database from but when i click submit i get the following error:
Parse error: parse error in /home/nathansc/public_html/handleform.php on line 19
I figured that this was a simple mistake within my PHP file. I went in to investigate and that i had left a quotation mark out on LINE 18. I corrected and re-uploaded the file to the server but am still getting the error. The following is the PHP file:
<html>
<head>
<title>Form Handler</title>
</head>
<body>
<?PHP
/ This page receives the data from index.html and submits it to the MySQL database./
//Trim the incoming data
$Array["Username"]=trim
($Array["Username"]);
$Array["Email"]=trim
($Array["Email"]);
$Host="localhost";
$User="*****";
$Password="";
$DBName="******";
$TableName="members";
$Link=mysql_connect($Host, $User, $Password);
$Query="INSERT into $members values
('$Array[Username]', '$Array[Email]')";
print ("The query is:<BR>$Query<P>\n");
if(mysql_db_query ($DBName, $Query, $Link)){
print("The query was successfully executed!<BR>\n");
} else {
print("The query could not be executed.<BR>\n");
}
mysql_close($Link);
?>
</body>
</html>
Does anyone see a syntax error? Should i also add the code for the form page? Thank you for your help...