Код:
<form method="POST" action="add.php" />
Заглавие:<input type="text" name="title" />
<br>
<br>
Рецепта: <textarea type="text" name="recipe" cols="50" />
</textarea>
<br>
<input type="submit" name="submit" value="Изпрати" />
</form>
<?
include "config.php";
$sql= "INSERT INTO `title`, `recipe`, `ip` VALUES ('$title', '$recipe', '$ip')";
$result= mysql_query($sql) or die (mysql_error());
if($_POST['submit']) {
$title = $_POST['title'];
$recipe = $_POST['recipe'];
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("F j, Y, g:i 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 ' `recipe`, `ip` VALUES ('', '', '')' at line 1