addnewsletters |
Hello,
I wonder why I have this error message? I already try to add somethings here but it does not works! views/addnewsletters.php PHP Code: <div class="widget-box"> models/Mpages.php PHP Code: public function add_newsletters() controllers/cpages.php PHP Code: public function addnewsletters() { A Database Error Occurred Error Number: 1048 Column 'newsl_name' cannot be null INSERT INTO `newsletter` (`newsl_name`, `newsl_date`, `newsl_content`) VALUES (NULL, NULL, NULL) Filename: C:/Program Files (x86)/EasyPHP-Devserver-16.1/eds-www/CompanyGiondaCI/system/database/DB_driver.php Line Number: 691
" If I looks more intelligence please increase my reputation."
Maybe you need to add a <form> or form_open to tell it where to post to.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Read the error message: your database record fields are not defined.
You don't have a form inside your view's HTML. I see no connection to your controller's addnewsletters method, and hence no way that input fields will be retrieved. Your validation is checking the wrong input field names.
This is the actual form.
views/addnewsletters.php PHP Code: <div class="span12">
" If I looks more intelligence please increase my reputation."
Why are you loading the library in a view? It should be loaded in the controller.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Also... you are setting rules for "newsletter_name", "newsletter_content" and inserting values from "'newsl_name", "newsl_date" (and "newsl_content") input fields... Hmm... This is hard...
Website: http://avenir.ro
(07-13-2016, 06:18 PM)davy_yg Wrote: This is the actual form.
" If I looks more intelligence please increase my reputation."
|
Welcome Guest, Not a member yet? Register Sign In |