Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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

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'];}) ?>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top