Народ,оч нужна ваша помощь!Тупо не работает UPDATE,т.е. я корректирую инфу,мне выдает,что все нормально,данные обновлены,а на деле нифига не меняется,вот код:
<?php
include ("blocks/bd.php");
if (isset ($_POST['title'])) {$title = $_POST ['title']; if ($title == '') {unset($title);}}
if (isset ($_POST['meta_d'])) {$meta_d = $_POST ['meta_d']; if ($meta_d == '') {unset($meta_d);}}
if (isset ($_POST['meta_k'])) {$meta_k = $_POST ['meta_k']; if ($meta_k == '') {unset($meta_k);}}
if (isset ($_POST['date'])) {$date = $_POST ['date']; if ($date == '') {unset($date);}}
if (isset ($_POST['description'])){$description = $_POST ['description']; if ($description == '') {unset($description);}}
if (isset ($_POST['text'])) {$text = $_POST ['text']; if ($text == '') {unset($text);}}
if (isset ($_POST['author'])) {$author = $_POST ['author']; if ($author == '') {unset($author);}}
if (isset ($_POST['id'])) {$title = $_POST ['id'];}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Обработчик</title>
<link href = "style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--Подключаем шапку сайта-->
<?php include ("blocks/header.php"); ?>
<!--Подключаем боковое меню сайта-->
<?php include ("blocks/sidebar.php"); ?>
<div id="content">
<?php
if (isset($title) && isset($meta_d) && isset($meta_k) && isset($date) && isset($description) && isset($text) && isset($author))
{
$result = mysql_query ("UPDATE `tanks` SET `title` = '$title', `meta_d` = '$meta_d', `meta_k` = '$meta_k', `date` = '$date', `description` = '$description', `text` = '$text', `author` = '$author' WHERE `id` = '$id'",$db);
if ($result == 'true') {echo "<p>Ваша статья успешно обновлена!</p>";}
else {echo "<p>Ваша статья не обновлена!</p>";}
}
else
{
echo "<p>Не все поля заполнены.</p>";
}
?>
</div>
<!--Подключаем футер сайта-->
<?php include ("blocks/footer.php"); ?>
</body>
</html>