<?
if (!$Parts || !$year || !$Model || !$Price || !$Description || !$Name || !$Address || !$Email || !$Phone || !$URL)
{
echo "You have not entered all the required information."
."Please go back and try again.";
exit;
};
$Parts = addslashes($Parts);
$Year = addslashes($Year);
$Model = addslashes($Model);
$Price = addslashes($Price);
$Desciption = addslashes($Desciption);
$Name = addslashes($Name);
$Address = addslashes($Address);
$Email = addslashes($Email);
$Phone = addslashes($Phone);
$URL = addslashes($URL);
@ $db = mysql_pcconnect("localhost", "parts", "dcatkin", "hellfire");
if (!$db)
{
echo "Error : Could not connect to the database, please try again later.";
exit;
};
~ mysql_select_db("parts");
$query = "Insert into parts values ('".$Parts"', '".$Year"', '".$Model"', '".$Price"', '".$Desciption"', '".$Name"', '".$Address"', '".$Email"', '".$Phone"', '".$URL"')";
$result = mysql_query($query);
$insert = mysql_insert($Parts);
if ($result)
echo mysql_affected_rows()."Part inserted into the database.";
?>
This is the input page for this script.
<a