Solved

IE8 Doesn't Refresh After Form Submission

Posted on 2010-11-21
5
713 Views
Last Modified: 2012-05-10
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

0
Comment
Question by:jjjulie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34186007
Here is a different way to post to itself.  Maybe this will make IE think it needs to load a new page.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 34186011
Try again.
<form name="frmUser" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">

Open in new window

0
 
LVL 30

Expert Comment

by:VirusMinus
ID: 34186129
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

0
 

Author Closing Comment

by:jjjulie
ID: 34186158
Thanks!
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34186163
You're Welcome!
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question