Link to home
Start Free TrialLog in
Avatar of jjjulie
jjjulie

asked on

IE8 Doesn't Refresh After Form Submission

I have a simple form that has a few hidden fields and one file upload field.  It submits to itself (action="").  When the form is submitted, the php script reads the uploaded file, inserts some data into the database, then shows a summary of the info that was uploaded.  This works fine in all browsers except IE8.

In IE8, the file still uploads and the database gets updated, but the page does not show a summary of the uploaded info - it just shows the form again.  It is as though IE8 is caching the display of the page.

Is there any way to force IE8 to show the new version of the page?

Here is a summary of the code I am using.

<?php
if (isset($_POST['submitted'])){
    // Process the file
    // Update the database
    // Show a summary of the uploaded data
}
else { ?>
    <form name="frmUser" action="" method="POST" enctype="multipart/form-data"> 
    <input type="hidden" name="submitted" value="1" />
    FILE: <input type="File" name="csvupload" />
    <input type="submit" name="submit" value="SUBMIT" />
    </form>
    <?php
}
?>

Open in new window

Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Here is a different way to post to itself.  Maybe this will make IE think it needs to load a new page.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can do it with an empty action like this:

<form name="frmUser" action="" target="_self" method="POST" enctype="multipart/form-data">

Open in new window

Avatar of jjjulie
jjjulie

ASKER

Thanks!
You're Welcome!