Jump to content

Back Button Blues


coderb

Recommended Posts

Hi All,

 

I know the back button is the cause of many headaches, and now it's mine. My pain is this:

 

I have a self posting page with a list of results and a form (method=get) for search criteria. This form also has a button that allows users to update all result rows to a certain status. I do this by simply adding a querystring value which if set is applied to each row before page build.

Okay, so my problem is this.

User clicks the button to update the status of all rows, the update is fine and the page is rendered with new status. Bear in mind the querystring value is still set for this update.

User then clicks a button to view the details of a result row. On the detail page they can update the status again to any value (which they do).

User then hits the back button to view the list again, hits refresh to see the updated status (as changed on the detail page).

But of course the querystring is still set with the value to run the status update and therefore cause overwrite of status changes made on the detail page.

 

So what I tried was this:

on the self posting page, add another small form that contains the button which updates the status. This form is method=post. that means I do away with having that value in a querystring. Of course the post value is still there after user hits the back button, but at least this time they get the standard browser pop-up message that warns them that the page contains postdata and OK / CANCEL option to avoid resend of data.

 

Of course this far from full proof , the average user is just gonna hit OK.

 

So, what do I do?

Can I clear the post data on a page after executing the portion of code that uses it?

any help appreciated.... thanks. 

 

Link to comment
https://forums.phpfreaks.com/topic/104681-back-button-blues/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.