如何在codeigniter中重新加载页面时如何在文本框中维护数据

how to maintain data in text box when page reloads in codeigniter.

Example: Suppose that I fill up the username and password and I refresh the page then the username and password’s fields should not be blank, they should contain the values before the reload

If this cannot be done in codeigniter what is the normal php method

I think you must use cookies or ajax fire on text changed of your textbox.

If you use ajax, you can then store values insides session.

Do it on client side.

Save the value of textbox to a cookie value on each key press.

When the page is loaded, check the cookie for a value, if there is, set it on the box.

(Don't forget to flush the value, after submitting data or using for whatever reason you are using)

By refresh do you mean upon submitting and failing on validation refreshing the page or simply just refreshing ?? If ur talking about a simple refresh then I Doubt there is any method to do it in CI or php. Yeah you could do it by client side scripting (js) and writing it to a cookie or make an ajax call to php script and save it to a session variable. And yeah do flush those values once saved as marvin said