db_connect();
$query = "SELECT * FROM `proizv` WHERE `ID` = ".$_GET['edit_id'];
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_assoc($result);
if (isset($_POST['edit'])) {
$Price = $_POST['price'];
$Article = $_POST['article'];
$query = "UPDATE `Processors` SET
Price = '".$Price."',
Article ='".$Article."'
WHERE ID = ".$_GET['edit_id'];
$result = mysql_query($query) or die(mysql_error());
db_close();
header("location: edit.php?edit_id=".$_GET['edit_id']);
if (isset($_POST['edit'])) {
db_connect();
$query = "UPDATE `Processors` SET Price=?, Article=? WHERE ID=?";
$data = array($_POST['price'], $_POST['article'], $_GET['edit_id']);
$db->prepare($query)->execute($data);
header("location: edit.php?edit_id=".$_GET['edit_id']);
}