Are you setting the variables in the form?

Something like this - note the value field in the username field:

 <form method="post" action="index.php" name="loginuser">
  <table summary="layout table to hold login data" width="300"
align="center" cellpadding="1" cellspacing="0" border="0" bgcolor="#ffffff">
  <td align="left"><p class="small"><b>Username:</b></p></td>
  <td align="left"><input type="text" name="username" value="<?php echo
$username;?>" maxlength="50" size="15" style="width: 120px; font-size:
  <td align="left"> <p class="small"><b>Password:</b></p></td>
  <td align="left"><input type="password" name="password" maxlength="50"
size="15" style="width: 120px; font-size: 12px">
  <td align="left"><p>&nbsp; </p></td>
  <td align="left"><p><input type="submit" value="login" name="login"
style="width: 50px; heigth: 18px; font-size: 12px"></p></td>

This way, depending on how youare refreshing the login form, if the
$username variable passed your validation tests it should be set
automatically into the form.



----- Original Message -----
Sent: Wednesday, August 21, 2002 12:58 AM
Subject: [PHP-DB] keeping form field data when reloading a form

> I have my email checker working now, and all the other fields are checked
> also, but when I do enter
> some wrong data the form is reloaded with all blank fields. I'm sure there
> is a way to keep the existing
> data in the fields so the end-user will only have to change the incorrect
> fields, and not have to re-enter
> all the data. But how?
> --
> Chip Wiegand
> Computer Services
> Simrad, Inc
> "There is no reason anyone would want a computer in their home."
>      --Ken Olson, president, chairman and founder of Digital Equipment
> Corporation, 1977
>  (They why do I have 9? Somebody help me!)
> --
> PHP Database Mailing List (
> To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to