I changed everything in which I was told to and now I'm getting errors such as T string and unexpected ','. Sorry, I'm really new to php.., please bear with me. Here's my updated php code.
<?php
$con = mysql_connect ("localhost", "user", "pass") or die ('I cannot connect to the database because: ' . mysql_error());
$db = mysql_select_db ("insurance", $con);
$sql = ("INSERT INTO info ('firstname', 'lastname', 'address', 'city', 'state', 'birthdate', 'telephone', 'email')
VALUES ('$firstname', '$lastname', '$address', '$city', '$state', '$birthdate', '$telephone', '$email')",
mysql_real_escape_string($firstname),
mysql_real_escape_string($lastname),
mysql_real_escape_string($address),
mysql_real_escape_string($city),
mysql_real_escape_string($state),
mysql_real_escape_string($birthdate),
mysql_real_escape_string($telephone),
mysql_real_escape_string($email),
$_POST['$firstname'],
$_POST['$lastname'],
$_POST['$address'],
$_POST['$city'],
$_POST['$state'],
$_POST['$birthdate'],
$_POST['$telephone'],
$_POST['$email']);
mysql_query($sql, $con);
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
?>