Welcome Guest, Not a member yet? Register   Sign In
The right way to redirect
#2

[eluser]connors[/eluser]
I'd use
Code:
redirect(site_url('dev/test'), 'refresh');
to ensure the path relative to your index.php (You'll need the url helper for the site_url() function)

To get the message to another page, use flash data.
Code:
$this->session->set_flashdata('upload_message', 'Successfully uploaded '.$data['data']['upload_data']['orig_name']);
While you on your dev/test page retrives it:
Code:
if(isset($this->session->flashdata('upload_message')) echo $this->session->flashdata('upload_message');
See the session library for documentation


Messages In This Thread
The right way to redirect - by El Forum - 04-16-2010, 01:28 PM
The right way to redirect - by El Forum - 04-16-2010, 01:37 PM
The right way to redirect - by El Forum - 04-16-2010, 02:34 PM
The right way to redirect - by El Forum - 04-16-2010, 03:46 PM
The right way to redirect - by El Forum - 04-16-2010, 03:49 PM
The right way to redirect - by El Forum - 04-19-2010, 06:56 AM
The right way to redirect - by El Forum - 04-19-2010, 06:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB