views:

224

answers:

3

Is there a way to retain values of textfield/textbox when a user submits a form? i only want to retain values with errors or values I specify.

For example i am posting to 10 blogs and 1-9 gets posted succesfully so I only want to retain the value from 10 when a page load after form submission. Can I do that? how?

+1  A: 

Store the values in the session. Pull them out when outputting the form.

Ignacio Vazquez-Abrams
thanks i got it. :)
giolicious
A: 

Yes! You can use session varriables. Refer to here http://www.coveryourasp.com/Session.asp

samer
A tutorial for ASP sessions isn't of much use in a PHP question...
Ignacio Vazquez-Abrams
A: 

You can do it without using session as well if you submitting form on same page.
in value of each input text add this:
value= <?php if(isset($_POST['form']){ echo $_POST['name_this_input'];}) ?>

neverSayNo