Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 21st, 2006, 09:00 AM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jgmantilla
Default

I have a dynamic site in PHP, where post data is often used. in some pages i have a back button that only does
       onclick=\"javascript:window.history.go(-1)\"> The only problem is that if the person do that on a window that had just received post data, the user gets a dialog that says "The page cannot be refreshed without resending the information. Click Retry to send the information again, or click Cancel to return to the page that you were trying to view." This is no good. Is there anyway I can automatically force a resend of the information, or is there another javascript way of doing what I am trying to do?


...If you are not sure don't mind to ask before you screw it!!
 
Old June 23rd, 2006, 10:53 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> Is there anyway I can automatically force a resend of the information, or is there another javascript way of doing what I am trying to do?

No, it isn't possible to circumvent the browser's POST data dialogue. You can try submitting your data via the GET method instead, or perhaps using JavaScript and XMLHttpRequest, in either of those cases you wouldn't see the POST data dialogue.



Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old December 19th, 2006, 04:36 PM
Registered User
 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I haven't tried this yet, so someone please correct me if you find out it doesn't work.

Let's say you have index.php with a form on it. What if you make this form submit to a different script, say index2.php. Then after you handle the submitted info in index2.php, you redirect back to index.php using headers. That way when you refresh index.php, you are not reloading a page that you submitted data to.

Just a thought, let me know if it works (or doesn't).

 
Old January 16th, 2007, 06:21 AM
Authorized User
 
Join Date: Nov 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to talk2leo
Default

try this

<meta HTTP-EQUIV="REFRESH" content="15; url=http://xyz.com/second.html">

if prob persists try to make a javascript function that cheks to save the data

Success is Never Ending,,Failure is Never Final





Similar Threads
Thread Thread Starter Forum Replies Last Post
Reload page Tooltip not work - Reload xslt file? ismailc XSLT 10 January 22nd, 2008 10:03 AM
Problem in Reload a GridView using Timer udhayav .NET Framework 2.0 0 December 16th, 2006 07:16 AM
Problem w/ session var being incremented on reload Storm ASP.NET 1.0 and 1.1 Basics 0 October 13th, 2004 01:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.