Welcome Guest, Not a member yet? Register   Sign In
How do you force redirect?
#1

[eluser]danbirlem[/eluser]
I have a form that after submitting I am trying to get it to go back to a fixed URL but it never seems to completely direct, only append the URL.

Here's the controller code:
Code:
function delete() {
        $this->Estimatemodel->delete_estimate();
        
        $html_head = array( 'title' => 'Estimate Management' );

        $estimates = $this->Estimatemodel->get_estimates();

        $this->load->view('html_head', $html_head);
        $this->load->view('estimates/view', array('estimates' => $estimates));
        $this->load->view('html_foot');
    }

The redirect() function within documentation doesn't work to append the URL, but I want a forced complete redirect to the URL.
#2

[eluser]OliverHR[/eluser]
Redirect only work if you use it befor sending any header to client, Maybe you can you use in your header the html metatag refresh.

http://www.w3schools.com/tags/tag_meta.asp
#3

[eluser]Afro Radio Head[/eluser]
Code:
$this->load->helper('url');

redirect("place/to/redirect");

This doesn't work? You can view the page at http://ellislab.com/codeigniter/user-gui...elper.html




Theme © iAndrew 2016 - Forum software by © MyBB