开发者

How to retain values of form fields after a page loads?

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 开发者_StackOverflow中文版want to retain the value from 10 when a page load after form submission. Can I do that? how?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜