Hi all
I have a small script for adding the contents of a form to a mySQL database, as well as emailing the form contents out. It works fine on the server if I give it a .php3 extension, but with .php or .php4 it gives this error:
submitform.php: parse error, expecting `'('' on line 21
Here is the code (i highlighted line 21 with # marks):
<body>
<?
mysql_connect (localhost, XXXX, XXXX);
mysql_select_db (test);
$result = mysql_query ("INSERT INTO testmss (FIRST_NAME, LAST_NAME, TITLE, SUB_DATE)
VALUES ('$first_name', '$last_name', '$title', NOW())
");
print ("<p>");
print ("Thanks for submitting your manuscript, "); ####note this is line 21##
print ("Dr. ");
print ($first_name);
print (" ");
print ($last_name);
if(!$result)
{
echo "<b>Server error: Please contact XXXX@XXXX.com</b> ", mysql_error();
exit;
}
if($type!="new")
{
echo "<br>Since this is a revision/resubmission, I will have to send this info to Tracy to be processed manually";
exit;
}
mail("XXXX@XXXX.com", "Online MANUSCRIPT submission", "A manuscript has been submitted of type $type.
Title: $title
Corresponding Author: $first_name $last_name
Comments to the Editor(s): $ed_comments
");
?>
</body>
Any ideas?
Thanks for your time.