Welcome Guest, Not a member yet? Register   Sign In
set a redirect with set_header?
#4

[eluser]generalsalt[/eluser]
Hello, thanks for the response. I am seriously new to all this, so bear with me....

I have a basic else/if to check the Post variable for username/password indexes. If it finds them, I do this...

Code:
$this->load->library('session');
                $this->session->set_userdata('username', $_POST['username']);
                $this->session->set_userdata('password', $_POST['password']);

If it doesn't find them I do this...

Code:
$this->output->set_header('location: http://url.com/try_again');

But it doesn't redirect me to where I want to go, it just goes to the page that I am trying to password protect! I also tried this...

Code:
redirect('/try_again', 'refresh');

...But I get a 'headers already sent' PHP error message.

I'm reading up on all this stuff right now, If I have a eureka moment–I'll post back.


Messages In This Thread
set a redirect with set_header? - by El Forum - 04-10-2009, 08:14 PM
set a redirect with set_header? - by El Forum - 04-11-2009, 12:11 AM
set a redirect with set_header? - by El Forum - 04-11-2009, 12:18 AM
set a redirect with set_header? - by El Forum - 04-11-2009, 11:05 AM
set a redirect with set_header? - by El Forum - 04-11-2009, 11:18 AM
set a redirect with set_header? - by El Forum - 04-11-2009, 11:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB