Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
edited tags
Link
Rooneyl
  • 7.9k
  • 6
  • 58
  • 83
Added extra comment
Source Link
Rooneyl
  • 7.9k
  • 6
  • 58
  • 83

I have a paginated display in which on each page call I set the current URI string into a session (in my controller).

$current = $this->uri->uri_string(); $this->session->set_userdata('return_to', $current); 

From the view the user can click a link to go somewhere else (an edit form), which when submitted (and form validation is correct) I want to return to the correct page of the paginated results.

if($this->form_validation->run('edit') == TRUE ) { $back_to = NULL; $back_to = '/'.$this->session->userdata('return_to'); .... redirect($back_to); } 

Seems to work sometimes in Firefox but dies in Chrome, redirect to favicon.ico

Any and all help appreciated

UPDATE: My problem isn't due to relative/absolute addresses, for some weird reason in the second controller the redirect aims to favicon.ico, not what was stored in the session.

I have a paginated display in which on each page call I set the current URI string into a session (in my controller).

$current = $this->uri->uri_string(); $this->session->set_userdata('return_to', $current); 

From the view the user can click a link to go somewhere else (an edit form), which when submitted (and form validation is correct) I want to return to the correct page of the paginated results.

if($this->form_validation->run('edit') == TRUE ) { $back_to = NULL; $back_to = '/'.$this->session->userdata('return_to'); .... redirect($back_to); } 

Seems to work sometimes in Firefox but dies in Chrome, redirect to favicon.ico

Any and all help appreciated

I have a paginated display in which on each page call I set the current URI string into a session (in my controller).

$current = $this->uri->uri_string(); $this->session->set_userdata('return_to', $current); 

From the view the user can click a link to go somewhere else (an edit form), which when submitted (and form validation is correct) I want to return to the correct page of the paginated results.

if($this->form_validation->run('edit') == TRUE ) { $back_to = NULL; $back_to = '/'.$this->session->userdata('return_to'); .... redirect($back_to); } 

Seems to work sometimes in Firefox but dies in Chrome, redirect to favicon.ico

Any and all help appreciated

UPDATE: My problem isn't due to relative/absolute addresses, for some weird reason in the second controller the redirect aims to favicon.ico, not what was stored in the session.

deleted 104 characters in body; edited title
Source Link
Rooneyl
  • 7.9k
  • 6
  • 58
  • 83

Redirect in Codeigniter - Google Chrome Error

I have a paginated display in which on each page call I set the current URI string into a session (in my controller).

$current = $this->uri->uri_string(); $this->session->set_userdata('return_to', $current); 

From the view the user can click a link to go somewhere else (an edit form), which when submitted (and form validation is correct) I want to return to the correct page of the paginated results.

if($this->form_validation->run('edit') == TRUE ) { $back_to = NULL; $back_to = '/'.$this->session->userdata('return_to'); .... redirect($back_to); } 

This works fineSeems to work sometimes in IE and Firefox, but dies in Chrome it redirects to favicon.ico. I have tried echo-ing out the value and as it seems, redirect to be getting rewritten after the form validationfavicon.ico

Any and all help appreciated

Redirect in Codeigniter - Google Chrome Error

I have a paginated display in which on each page call I set the current URI string into a session (in my controller).

$current = $this->uri->uri_string(); $this->session->set_userdata('return_to', $current); 

From the view the user can click a link to go somewhere else (an edit form), which when submitted (and form validation is correct) I want to return to the correct page of the paginated results.

if($this->form_validation->run('edit') == TRUE ) { $back_to = NULL; $back_to = '/'.$this->session->userdata('return_to'); .... redirect($back_to); } 

This works fine in IE and Firefox, but in Chrome it redirects to favicon.ico. I have tried echo-ing out the value and as it seems to be getting rewritten after the form validation.

Any and all help appreciated

Redirect in Codeigniter

I have a paginated display in which on each page call I set the current URI string into a session (in my controller).

$current = $this->uri->uri_string(); $this->session->set_userdata('return_to', $current); 

From the view the user can click a link to go somewhere else (an edit form), which when submitted (and form validation is correct) I want to return to the correct page of the paginated results.

if($this->form_validation->run('edit') == TRUE ) { $back_to = NULL; $back_to = '/'.$this->session->userdata('return_to'); .... redirect($back_to); } 

Seems to work sometimes in Firefox but dies in Chrome, redirect to favicon.ico

Any and all help appreciated

Source Link
Rooneyl
  • 7.9k
  • 6
  • 58
  • 83
Loading