[eluser]Philip Pryce[/eluser]
Well in this thread i just want to ask if i was trying to get a user to return to a form after validating their input wrong, if i just referenced the page function instead of just re-writing it again, is this technically the right way to do it?
For example, say i have these two functions in a Controller called User
Code:
function signin ($error=false, $errormsg='') {
if ($error == true) {
echo $errormsg;
}
... lots more code to display sign in form etc
}
function proccessSignIn () {
... validation rules etc
if ($this->validation->run()
$this->signin(true, $this->validation->error_string);
die()
}
... more code if the user did meet the validation rules to sign them in
}
sorry for no tab indentations, i wrote this off the top of my head.
Thanks.