Blog Input Form |
Hello,
I already try inputing certain information into the blog and form hoping that my input will be place into the database. but I have not seen any text that I input in the database. Can anyone help me fix my codes so that I could input the text in the database. Thanks in advance. A Database Error Occurred Error Number: 1048 Column 'date' cannot be null INSERT INTO `blog` (`date`, `title`, `content`) VALUES (NULL, 'Title', '\r\nContent\r\n') Filename: C:/Program Files (x86)/EasyPHP-Devserver-16.1/eds-www/blog/system/database/DB_driver.php Line Number: 691 May 2016 Su Mo Tu We Th Fr Sa Date : 6 May 2016 Upload : [Browse] Title : [Title] Content : [Content] [ Submit ] views/blog.php PHP Code: <html> models/blog_model.php PHP Code: public function insert_blog()
" If I looks more intelligence please increase my reputation."
(05-05-2016, 10:00 PM)davy_yg Wrote: Hello, Are you using datetime in your table? Lets get that straight first.
You probably want to insert the current date/time. This is how to do that:
PHP Code: $data = array( If the date is actually posted by your form, in a field named 'date', then the value is in $this->input->post('date'); |
Welcome Guest, Not a member yet? Register Sign In |