Welcome Guest, Not a member yet? Register   Sign In
header location
#2

[eluser]Tpojka[/eluser]
Code:
header("location:".base_url()."index.php/success/page/home/$data");
Will redirect you to:
controller Success/
method page/
with arguments home/
and $data as provided.

[url=
http://ellislab.com/codeigniter/user-gui...gniterURLs[/url]

If not changed anything in [url=
http://ellislab.com/codeigniter/user-gui...]route.php[/url]
file.

If you want to pass variable to your some_view.php file, you don't need to
use redirect function, but just loading [url=
http://ellislab.com/codeigniter/user-gui....html]view[/url].
Pay attention of 'Adding dynamic data to view' section of the page. That
would be needed part.

Code:
public function members(){
$username = $this->session->userdata('username');

$data['user'] = $username;

$this->load->view('name_of_view_file_without_php_extension', $data);
// in view file you have approach to this variable simply calling it with
*$user* (no stars)

}


Messages In This Thread
header location - by El Forum - 10-18-2013, 06:10 AM
header location - by El Forum - 10-18-2013, 01:01 PM
header location - by El Forum - 10-25-2013, 06:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB