public function adduser()
{
$this->load->model('User', 'user');
$this->user->adduser();
$data = array('message' => 'Thanks for signing up');
$this->load->view('register', $data);
}
This is my function and it executes perfectly and gives a message of thanks to the register view page. But when I am loading the register view page initially, it gives me an error.
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: message
Filename: views/register.php
Line Number: 15
if anyone can help where it is going wrong.