• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Cache management in PHP

kag

Golden Member
On my main page, I have a form and when it's submitted, PHP does some processing and it outputs some JavaScript code that copies a letter to the clipboard, then does a javascript:history.go(-1).

When it goes back to the original page, all the data is gone. So I'm wondering if there's a way to keep the data in the form when it goes back? I don't care if you have a trick that only works in IE, I'm the only user of that application and I'm using IE right now.
 
Only way I've ever been able to get it to work on all browsers was to save some variables to the PHP session, then check for them when the page reloads or goes back.
 
Haha, I was actually trying to reach you on MSN before posting my question here.

The cookie method would be the "universal" solution... but anyway it's not *necessary*.

I have a form where I enter some information and PHP generates my résumé in .PDF using the FPDF library, and I save it to my HD. Since I set it to download the .PDF instead of showing it in the browser, I don't leave the page at that step. Then I have a second submit button that takes the information from the form and generates only my cover letter in plain text, so I can paste it in the application form on Jobboom. It's at that step that I'm loosing my information in the form. But it's okay because at that point, I have everything I need to apply for the job... it would just have been nice.
 
Back
Top