Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

IE8 Doesn't Refresh After Form Submission

Posted on 2010-11-21
5
Medium Priority
?
714 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 84

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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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 84

Expert Comment

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

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

704 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