Welcome Guest, Not a member yet? Register   Sign In
displaying errors
#1

[eluser]weetstraw[/eluser]
I recently started playing with displaying errors if a URI segment is true. So if something is false, it redirects to the error page. Is this a bad practice? I personally like it.

Code:
function login()
{
    $error=$this->uri->segment(3);  
    $data['title']=" - Login";
    $data['body']="Currently we are accepting users ....";

    if($error==TRUE){
        $data['header']="Login - <span class=\"error\">Wrong Username or Password</span>";
    } else {
        $data['header']="Login";
    }

more code....

Code:
...code...

$this->session->set_userdata('name',$this->input->post('username'));
    redirect('');
} else {
    redirect('user/login/error');
}


Messages In This Thread
displaying errors - by El Forum - 04-21-2009, 08:15 AM
displaying errors - by El Forum - 04-22-2009, 10:32 AM
displaying errors - by El Forum - 04-22-2009, 01:02 PM
displaying errors - by El Forum - 04-22-2009, 01:13 PM
displaying errors - by El Forum - 04-22-2009, 01:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB