views:

6

answers:

0

I have 2 pages: one with a form and one that prints PayPal button. 1st page has script that prints the form, validates it and when everything is OK redirects the user to the second page that prints out PayPal button. On both pages I use session_start() to prevent CSRF. (when the accidently get to the second page, they are redirected to the first one) The problem is: when the user fills out the form and then accidentally goes to different page, and then goes back to the form - all the form fields are cleared out. I know that session is doing that, because when I remove the session, form acts like it's supposed to. How to prevent session from clearing $_POST values? Thanks!