[eluser]the_unforgiven[/eluser]
Hi All,
I'm getting this error:
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: libraries/Form_validation.php
Line Number: 320
Fatal error: Call to a member function load() on a non-object in /home/site/public_html/system/libraries/Form_validation.php on line 320
Here's the controller
Code:
function send()
{
// Set Validation Rules
$this->form_validation->set_rules('name', 'Name', 'required');
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
$this->form_validation->set_rules('phone', 'Phone', 'trim|required');
$this->form_validation->set_rules('message', 'Message', 'trim|required');
// Validation runs false rteun back to form and show errors
if ($this->form_validation->run() == FALSE) {
$this->index();
}
// If everything is filled out with no errors procced with sending the form to email and database
else {
echo 'Submitted';
}
}
I have tried commenting out line by line but still no joy then if i comment out them all it does kinda work, just wondering why this is not working can anyone shed some light on this for me?
Help much appreciated.