Posted by Beauregard T. Shagnasty on 11/21/07 20:36
Chris wrote (a question for a php group):
> I have a form that is processed by a php page and then redirected by
> the same php page back to the form page again.
...as you would do if there were errors or omissions in the filled-in
form.
> After the page has redirected back it clears the data entered in the
> form's textfield and combo selections. Is there a simple way of
> mainting the user's text/selections after the form has been
> redirected?
You have to send back the values and re-display them.
Example:
$contactname = $_POST['contactname'];
$email = $_POST['email'];
........
<div>
<p>Your name:</p>
<label><input type="text" name="contactname" size="30"
value="<?php echo "$strcontact";?>"></label>
</div>
<div>
<p>Your email address:</p>
<label><input type="text" name="email" size="30"
value="<?php echo "$stremail";?>"></label>
</div>
--
-bts
-Motorcycles defy gravity; cars just suck
Navigation:
[Reply to this message]
|