Welcome Guest, Not a member yet? Register   Sign In
Redirect() Help needed (solved)
#1

[eluser]Jonny5ive[/eluser]
Hi, I've set up the add/edit tutorial http://codeigniter.com/wiki/Add_Edit_Views/, however I cannot get the redirect to work.

// the code at the bottom of controller
redirect('departments', 'redirect');

Firstly I thought the second parameter could only be 'location' or 'refresh'. Should 'redirect' work?

I've checked and there doesn't appear to be anything being outputted to the browser before the redirect, however it just won't work!

Any advice or help would be greatly appreciated,

the n00b
#2

[eluser]saidai jagan[/eluser]
can u post u r sample code ?
#3

[eluser]bas_vdl[/eluser]
did you load the url helper?

Code:
$this->load->helper('url');
#4

[eluser]Jonny5ive[/eluser]
[quote author="bas_vdl" date="1253740367"]did you load the url helper?

Code:
$this->load->helper('url');
[/quote]

Wow! that hit the nail on the head!

Nice1 dudes :-)




Theme © iAndrew 2016 - Forum software by © MyBB