This is my first post here, I'm looking for a new PHP forum to learn on. I hope I can find help.
I have the simplest of problems. I have an HTML form to input data to a PHP file, which in-turn submits that data to a MYSQL database. It worked fine in the last version I had made, but now I am updating the code and database to have more fields (specifically integers), and now Im getting the old UNEXPECTED T_STRING error. I have tried a hundred different modifications to the code on the line specified (49) , but to no avail. I cant see were there is a mistake in the code.
Heres a copy starting at line 32. Line 49 is were it echoes "record added"
<?php
$con = mysql_connect("localhost","USERNAME","PASSWORD");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("bail_bail", $con);
$sql="INSERT INTO bailfiles (name, bailamount, otn, date, docket, info, security)
VALUES
('$_POST[name]','$_POST[bailamount]','$_POST[otn]','$_POST[date]','$_POST[docket]','$_POST[info]','$_POST[security]',');
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "record added";
mysql_close($con);
?>
Im completely stumped. any ideas?