Hi
i am getting following error please help
Parse error: parse error, unexpected T_STRING in /usr/local/apache/www/insert_bday1.php on line 55
here is my code
<html>
<head>
<title>Entry Results</title>
</head>
<body>
<h1>Entry Results</h1>
<?
#if (!$name || !$last || !$street || !$city || !$zip || !$dob )
#{
#echo " You have not entered all the required details.<br>"
."Please go back and try again.";
#exit;
#}
$name = addslashes($POST[name]);
$last = addslashes($POST[last]);
$email = addslashes($POST[email]);
$street = addslashes($POST[street]);
$city = addslashes($POST[city]);
$zip = addslashes($POST[zip]);
$state = addslashes($POST[state]);
$phone = addslashes($POST[phone]);
$month = addslashes($POST[month]);
$day = addslashes($POST[day]);
$year = addslashes($_POST[year]);
#echo "<pre>";
#print_r($_POST);
#echo "</pre>";
@ $db = mysql_pconnect("localhost", "", "");
if (!$db)
{
echo "Error : Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("bday");
$query = "insert into customers (name, last, email, street, city, zip, state, phone, month, day, year, customerid) v
alues
('$name', '$last', '$email', '$street', '$city', '$zip', '$state', '$phone', '$month', '$day', '$year', '' )
";
#$result = mysql_query($query);
$result=pg_exec("select *
from customers
where name = '$name'
and last = '$last'
and street = '$street'
and city = '$city'
and zip = '$zip'
and month = '$month'
and day = '$day'");
");
if ( pg_NumRows($result) == 0 ) {
$result = mysql_query($query);
} else {
print "data already in database\n";
}
die('MySQL error: ' . mysql_error() . '<br>Query: ' . $query);
if (!$name || !$last || !$street || !$city || !$zip || !$month || !$day )
{
echo " You have not entered all the required details.<br>"
."Please go back (Use your Browser back button) and try again.";
exit;
}
if ($result)
echo mysql_affected_rows(). " member added to Birthday Club.";
?>
</body>
</html>