help! im pretty new at PHP, and im creating a simple pdf form with an html submit document. however, when i hit submit i get this error.
Parse error: parse error, unexpected T_STRING in home/content/c/r/z/crzycm16/html/insert.php on line 42
my form is at http://www.shsinteract.com/vets.pdf
and i am following this tutorial, http://www.andrewheiss.com/Tutorials?page=LiveCycle_PDFs_and_MySQL
My code is as follows,
Thanks for the Help!
Cameron
<?php
$host="p50mysql81.secureserver.net";
$username="Vetsform";
$password="Amina123";
$db_name="Vetsform";
$tbl_name="vetform";
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$VeteranName=$_REQUEST["VeteranName"];
$Address=$_REQUEST["Address"];
$StateProv=$_REQUEST["StateProv"];
$ZipCode=$_REQUEST["ZipCode"];
$Branch=$_REQUEST["Branch"];
$Dateserved=$_REQUEST["Dateserved"];
$Comments=$_REQUEST["Comments"];
$guestname=$_REQUEST["guestname"];
$Phonenumber=$_REQUEST["Phonenumber"];
$city=$_REQUEST["city"];
$sql="INSERT INTO $tbl_name(VeteranName, Address, StateProv, ZipCode, Branch, Dateserved, Comments, guestname, Phonenumber, city)
VALUES('$VeteranName';
'$Address';
'$StateProv';
'$ZipCode';
'$Branch';
'$Dateserved';
'$Comments';
'$guestname';
'$Phonenumber';
$city')
$result=mysql_query($sql);
if($result){
echo "Successful";
}
else {
echo "ERROR";
}
mysql_close();
?>