Can you give helpers a variable and change the function it uses in CodeIgniter
I am creating a form and I want to make a custom error log, for example when the user leaves e-mail empty, I want to give my error_helper the variable email, sending to the user that they did not fill in this variable and log that they left this empty. I am a starter with codeIgniter and I've read the manual but I did not find anything helpful. Here is my code: public function submitCheck() { $this->load->model("User"); if(empty($post['email'] || 'email'=="")) { echo "Email is empty."; //This will be changed to a view for user $this->load->helper('error'); //Loading the helper errorLog('Firstn
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.