Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8352225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:54:12+00:00 2026-06-09T08:54:12+00:00

I have a strange issue here – see below. Page X Contain a form

  • 0

I have a strange issue here – see below.

Page X

  • Contain a form having method as post
  • User submits the form – There some form validation.
  • If everything validates I save the data, set a flash data message in the session (i.e. query success/failed) and redirect() the user to current_ur()
  • Now, I can see the flash message and If I press F5 – I get do you want to submit the form again?

Shouldn’t this just refresh the page? How do I stop it making another submit request?
If I redirect to Page Y, and press F5 there, then it doesn’t ask me to resubmit? I am lost here!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:54:18+00:00Added an answer on June 9, 2026 at 8:54 am

    OK guys

    This is NOT a CodeIgniter issue. It is an issue with Firefox. I’m using 14.0.1 version of Firefox.

    I have tried the same form and process in IE 7, 8, 9, Safari 5, Chrome (latest) – they don’t show me the confirmation dialog box to re-submit the form on F5.


    Update

    In firefox I get this message –

    To display this page, Firefox must send information that will repeat
    any action (such as a search or order confirmation) that was performed
    earlier.

    I just setup another script (without CI) and tested in Firefox. I tried to create the similar process (i.e. post and redirect to same page) … I don’t get this message at all. Refresh works just fine. So I take Its back on to CI now?

    Update 2

    OK I think I have cracked it now –

    I’m using CI’s redirect function – see below – the second parameter takes default value as ‘auto’ and when it’s auto it sends header as header('Refresh:0;url='.$uri); which makes the Firefox throw the above message. As mentioned above, I don’t get the same behaviour in other browsers. I hope it helps someone.

    function redirect($uri = '', $method = 'auto', $http_response_code = 302)
    {
        if ( ! preg_match('#^https?://#i', $uri))
        {
            $uri = site_url($uri);
        }
    
        // IIS environment likely? Use 'refresh' for better compatibility
        if (DIRECTORY_SEPARATOR !== '/' && $method === 'auto')
        {
            $method = 'refresh';
        }
    
        switch($method)
        {
            case 'refresh':
                header('Refresh:0;url='.$uri);
                break;
            default:
                header('Location: '.$uri, TRUE, $http_response_code);
                break;
        }
        exit;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a strange issue here, i have this bit of code: <?php if
We have here a strange issue. We have a comments form where users can
I have a strange issue here with my Django app. I implemented the user
We're having a strange issue here. Unfortunately I'm not at liberty to post the
I have a strange issue. Here is the error message: Call to undefined method
I'm having a strange issue here. I have a For loop inside a sub,
I have a strange issue. It almost seems like a bug. if ($object->error) {Form::BuildReturn();
I have a bit of a strange issue here. I created a custom control
Having a strange issue with the TabContainer in the AJAX Toolkit. We have several
I have a strange issue with sending a mail with php, here is my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.