[eluser]awpti[/eluser]
Other info:
Here's the 'index':
Code:
function index()
{
// This only renders the form.
$this->view->part('header', 'tpl/header');
$this->view->part('footer', 'tpl/footer');
$this->view->load('add_job');
}
And the validation:
Code:
function validate()
{
$this->view->part('header', 'tpl/header');
$this->view->part('footer', 'tpl/footer');
// Set the validation rules.
$rules = array
(
'location' => '',
'email' => 'required|valid_email',
'job_title' => '',
'description' => '',
'to_apply' => ''
);
$this->validation->set_rules($rules);
if ($this->validation->run() == FALSE)
{
$this->load->view('add_job');
}
else
{
$this->load->view('job_accepted');
}
}