I'm busy trying to do my first php to MySQL project using Dreamweaver MX.
I have a pretty straight forward form, but when I hit the "submit" button, I get the following error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/breforml/public_html/patientSubmissionScript.php on line 14
Now, the code in my INSERT script looks like this:
<?php
//open the connection
$conn = mysql_connect("localhost", "breforml_kevin", "joshcam1");
//pick the database to use
mysql_select_db ("breforml_main", $conn);
//create the sql statment
$sql = "INSERT INTO main values('','$_POST[fName]','$_POST[sName]', '$_POST['patientAge'],
'$_POST', '$_POST[cupSize]', '$_POST[chest]', '$_POST[hTel]', '$_POST[wTel]', '$_POST[cTel]',
'$_POST[financeReq]', $_POST[patientsubscribe]','$_POST[comments]')";
//execute the sql statement
if (mysql_query($sql, $conn)){
echo "Thank you! You have been added to our database and we will contact you shortly.";
} else{
echo "Sorry, but something went wrong with your enquiry. Please go back and ensure that all fields have been completed.";
}
?>
Can anybody help me with this?