MySQL is giving me an error, but I can't figure out what is causing it.
Here is my code
Thanks to all.
Here is my code
PHP Code:
function insert($author,$topic,$email,$mood,$entry)
{
$this->author = $author;
$this->topic = $topic;
$this->email = $email;
$this->mood = $mood;
$this->entry = addslashes($entry);
$this->entry = nl2br($entry);
$this->date = date("l, F j, Y");
$this->month = date("F");
$this->unparsed = $entry;
$this->emoticons();
$result = "INSERT INTO `blog`(`id`,`author`,`topic`,`email`,`mood`,`date`,`entry`,`np`,`month`) VALUES('NULL','{$this->author}','{$this->topic}','{$this->email}','{$this->mood}','{$this->date}','{$this->entry}','{$this->unparsed}','{$this->month}')";
mysql_query($result) or die(mysql_error());
Header("Location: des.php?mode=view");
}
Comment