[eluser]WoolyG[/eluser]
Hi all,
I'm new around here, and this is the first of many frivolous questions, I'm sure. I've been knocking my head off this for hours, to no avail, so hopefully someone can shed some light.
My URL Helper seems not to be loading, for a simple setup.
Controller Code:
Code:
class Validator extends Controller{
function Validator(){
// Load Parent
parent::Controller();
// Load URL Helper
$this->load->helper('url');
// Load Form Helper
$this->load->helper('form');
//Load Validation Class
$this->load->library('validation');
}
function index(){
// Set Validation rules
$rules['user_firstname'] = "required";
$rules['user_lastname'] = "required";
$rules['user_email'] = "required";
$this->validation->set_rules($rules);
// Check if form has been submitted properly
if($this->validation->run() == FALSE){
//Redisplay form
$this->load->view('form_view');
} else {
$this->load->view('success_view');
}
}
}
Success View:
Code:
class Validator extends Controller{
function Validator(){
// Load Parent
parent::Controller();
// Load URL Helper
$this->load->helper('url');
// Load Form Helper
$this->load->helper('form');
//Load Validation Class
$this->load->library('validation');
}
function index(){
// Set Validation rules
$rules['user_firstname'] = "required";
$rules['user_lastname'] = "required";
$rules['user_email'] = "required";
$this->validation->set_rules($rules);
// Check if form has been submitted properly
if($this->validation->run() == FALSE){
//Redisplay form
$this->load->view('form_view');
} else {
$this->load->view('success_view');
}
}
}
When I come to the view success_view, I get the following:
Fatal error: Call to undefined function anchor() in C:\Program Files\xampp\htdocs\application\controllers\success_view.php on line 12
All input appreciated!
WoolyG