There are a couple of ways that you can do this:

1. Store the post values in the $_SESSION variable then echo them back to the 
screen. Be careful with this as it can lead to XSS. Strip html, etc
2. Send the post values back to the form as part of the query sting. This 
solution is limited to the size of the query string (2k). Be careful with XSS

Another solution is to use a framework to handle the post back values. One such 
framework is called Raxan. Here's an example of what it can do:

Raymond Irving

From: Merlin Morgenstern <>
Sent: Tue, November 24, 2009 12:14:01 PM
Subject: [PHP] processing html forms and keeping the values

Hi there,

I am trying to redirect a user back to a html form if a validation failes. The 
form shoult then hold all entered values. So far I did this over $_GET, but 
there is a 100 Character limitation. How could I do this while keeping all 

Thank you for any hint,


-- PHP General Mailing List (
To unsubscribe, visit:

Reply via email to