Posted by Shelly on 11/02/07 00:25
Animesh K wrote:
> What is the best method to handle an incomplete form? How to preserve
> and display the data that has been already filled?
>
> I know this is classical stuff, but I could not find any great
> reference for it yet.
>
> Best,
> Animesh
I collect all the POST data into variables. In the HTML area I have the
values of the fields set to those variables. I also have the form post to
itself and do a header() command to change pages on success.
An example might be a text field "city". In the html area I would have
<input type="text" name="city" value="<?php echo $city; ?>"> where $city is
the value of the obtained from the post of that field.
This may not be the best way, but it sure works.
Shelly
[Back to original message]
|