Rabu, 06 Januari 2010

HTML Sticky Form, HTML Form That Remember The Value


HTML Sticky Form, What is that..? HTML Sticky Form is HTML Form That Remember The Value that has been POST or Get after a Submitting.

Have You Ever doing a inputting data in a web information system that has so many field to input.
How about a failure to input the data, I mean a connection failure or our input making a system denied to save the data?? We will a little bit angry to re-enter the data from the beginning.

A PHP Programmer usually know about this technique because very simple. It is very important if we develop a user friendly information system. But usually we are lazy to do that..wait, wait and until the system implementation many protest from the user.

We must prepare about this condition, so if there any time to make the HTML Form become HTML Sticky Form, just do it.

A simple way to make HTML Sticky Form is adding a value in the HTML Element

echo"<input name=\"nama\" type=\"text\" size=\"40\" value=\"$_POST[nama]\" $readonly />";

or more simple HTML Syntax, that using

<input name=nama type=text size=40 value=<?php echo"$_POST[nama]"; > >

Remember the form action, if the action was post use POST in the HTML elemen (form above using post method). You can also use get method, just change
$_POST[nama] with $_GET[nama].


Related Post:

Tidak ada komentar: