[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: Ошибка в коде !!!
Vendeta16
Привет всем! Я написал код для редактирования объявления на сайте . . .
<?php      
include_once "bd.php";
if (isset($_POST['clic1'])) {
$square = $_POST['square'];
$square = stripslashes($square);
$square = htmlspecialchars($square);
$title = $_POST['title'];
$title = stripslashes($title);
$title = htmlspecialchars($title);
$text = $_POST['text'];
$text = stripslashes($text);
$text = htmlspecialchars($text);
$adress = $_POST['adress'];
$adress = stripslashes($adress);
$adress = htmlspecialchars($adress);
$price = $_POST['price'];
$price = stripslashes($price);
$price = htmlspecialchars($price);
$name_user = $_POST['name_user'];
$name_user = stripslashes($name_user);
$name_user = htmlspecialchars($name_user);
$telephone = $_POST['telephone'];
$telephone = stripslashes($telephone);
$telephone = htmlspecialchars($telephone);
$skype = $_POST['skype'];
$skype = stripslashes($skype);
$skype = htmlspecialchars($skype);
$icq = $_POST['icq'];
$icq = stripslashes($icq);
$icq = htmlspecialchars($icq);



$query = ("UPDATE `advertisement` ('square', 'title', 'text', 'adress', 'price', 'name_user', 'telephone', 'skype', 'icq') VALUES ('$square', '$title', '$text', '$adress', '$price', '$name_user', '$telephone', '$skype', '$icq')");
$result = mysql_query($query) or die(mysql_error());
echo '<font color="green"><img border="0" src="ok.gif" alt="Ви успішно редагували об\'яву!">Ви успішно редагували об\'яву!</font><br><a href="index.php">На головну</a>';
}
?>

Но он почему-то не работает, а выбивает ошибку . . .
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('square', 'title', ''text'', 'adress', 'price', 'name_user', 'telephone', 's' at line 3
Я не понимаю что не так, что мне делать??????
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.