View Single Post
Old 02-04-2006, 08:11 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,529
sde is on a distinguished road
you could try saving the info in a session. for example:
PHP Code:
<?
session_start
();

if( 
$_POST] ) {
  
$_SESSION['usename'] = $_POST['username'];
  
// do all your other stuff
}

// then on the form, the input boxes would look something like this
?>
<input type=text name=username value="<?=$_SESSION['username']?>">
then no matter where you take them, .. when they go back to the form page, those values will be there by default. i would clear out the session values once the form goes through successfully though.

if you can, do your validation client side and you won't have to deal with this. but if you need to go server side, and the form action is a different page than the form, then you'lle probably have to use this.

if your action page is the same page as the form, then you can just do something like this:
PHP Code:
<input type=text name=username value="<?=$_POST['username']?>">
sde is offline   Reply With Quote