Hi, I'm pretty new to this, so these might be some silly questions, but hey, I'm here to learn =D
I'm currently trying to create a form, using html, php and MySQL, the only problem is that I keep getting the same error, which is as follows
Parse error: syntax error, unexpected T_STRING in /home/ecomaxi1/public_html/protected/tableget.php on line 14
my script is this:
<?php
$con = mysql_connect("host","user","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("database", $con);
$sql="INSERT INTO table (FirstName, LastName, Age)
VALUES
('$_POST[firstname]','$_POST[lastname]','$_POST[age]')"
mysql_query('$sql','$con')
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
what is my error, how can I fix it?
thank you =)