store - Result of adding furniture</h1>
<?
$code =$_REQUEST[code];
$price =$_REQUEST[price];
$country =$_REQUEST[country];
$type =$_REQUEST[type];
if (!$code || !$price || !$country || !$type) {
echo "Enter all data.<br>"
."Try again.";
exit;
}
$code = addslashes($code);
$country = addslashes($country);
$type = addslashes($type);
$price = doubleval($price);
@ $db = mysql_pconnect("localhost", "root", "");if (!$db) {
echo "Error. Cannot connect with database. Try again later.";
exit;
}
mysql_select_db("furniture_store");
$query = "insert into furniture_store values ('".$code."', '".$price."', '".$country."','".$type."')";
$result = mysql_query($query);
if ($result)
echo mysql_affected_rows()." furniture added to database.";
?>
</body>
</html>
такие вот, например
Обсуждают сегодня