Код cost.Php
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta
http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title></title>
</head>
<?
if
(isset($_POST['id_cost'])) { $id_cost =$_POST['id_cost'];}
if
(isset($_POST['new_cost'])) { $new_cost=$_POST['new_cost']; }
if
( empty($id_cost) or empty($new_cost))
{
exit
("ADD TEXT!");
}
$db="kvv";
$link
= mysql_connect( "localhost", "root", ""
);
if
(!$link)
die("Couldn't
connect to MySQL" );
mysql_select_db($db);
$result
= mysql_query ("UPDATE `commondity` SET `cost`='$new_cost' WHERE
`id_commondity` = '$id_cost'");
if
($result=='TRUE')
{
echo
"Ok. <a href='index.php'>Back</a>";
}
else
{
echo
"False!";
}
?>
<body>
</body>
</html>