this code does not error on me...yet does not display the last echo line, nor add anything to my file...
what is going on?
<?PHP
if (!$type || !$year || !$specs)
{
echo "You have not entered all the required details.<br>"
."Please go back and try again.";
exit;
}
$type = addslashes($type);
$year = addslashes($year);
$specs = addslashes($specs);
@ $db = mysql_pconnect("localhost" , "***" , "***");
if (!$db)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("surplus");
$query = "insert into surplus values
('".$type."' , '".$year."' , '".$specs."')";
$result = mysql_query($query);
if ($result)
echo mysql_affected_rows()." surplus added to the database.";
?>