Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

when i post info and transfer it from when page to onther

when i use the post method in order to trnsfer info fromone page to onthe every thing works fine but when i click on the refresh button i get this thng

to display tis page firefox mustsend information that will reapet any action (such as a sarch or order confirmation ) that was prformed earlier

how can i change this that when i click on refresh all the info that was gaten from the post i the page before this to be deleted ?
or any other methed will work fine
0
mgtm3
Asked:
mgtm3
1 Solution
 
Roger BaklundCommented:
I have two different approaches, select one:

1) Create a querystring and redirect to the page with all parameters in the url. There can not be too many parameters, or rather, they can not be too long. (Sorry, don't know exactly how long, but less than 2000 characters). Populate the form with values from the querystring ($_GET).

2) Store the parameters in the database, assign a unique and secure token and redirect the user to the page with only the token in the querystring. Use the token to lookup the other parameters in the database, and populate the form.

To redirect, you use the PHP funtion header() to send a HTTP location header, like this:
header('Location: http://yourdomain.com/yourpage.php?'.$querystring);

Open in new window

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now