[eluser]php-zbatev[/eluser]
hi,
I followed the blog tutorial and i am almost through but I'm have this problem with the
given insert statement:
function comment_insert()
{
$this->db->insert('comments',$_POST);
redirect('blog/comments/'.$_POST['entry_id']);
}
---------------------------------------------------------------------------------------
and ended up with this error:
An Error Was Encountered
Error Number: 1054
Unknown column 'Submit_Comment' in 'field list'
INSERT INTO `comments` (`entry_id`, `body`, `author`, `Submit_Comment`)
VALUES ('1', 'comment nako ni', 'z', 'Submit Query')
---------------------------------------------------------------------------------------
the Submit Comment is a submit button:
<p><input type="submit" name="Submit Comment"/></p>
I think that the error was triggered by
$this->db->insert('comments',$_POST); but my question is why did it work in the vid tutorial, where do you think did I miss out?