Re: [PHP-DB] keeping form field data when reloading a form
yes thats right Russ [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]. .. Chip: Just use the names of the fields as the values too: input type='text' name='Email' value='$Email' / HTH :-) Russ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 1:58 AM To: PHP_DB 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 www.simradusa.com [EMAIL PROTECTED] 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 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] keeping form field data when reloading a form
Thanks, that works great. -- Chip Stuart McDonald [EMAIL PROTECTED] wrote on 08/20/2002 05:55:40 PM: 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= #ff tr td align=leftp class=smallbUsername:/b/p/td td align=leftinput type=text name=username value=?php echo $username;? maxlength=50 size=15 style=width: 120px; font-size: 12px/td /tr tr td align=left p class=smallbPassword:/b/p/td td align=leftinput type=password name=password maxlength=50 size=15 style=width: 120px; font-size: 12px /tr tr td align=leftpnbsp; /p/td td align=leftpinput type=submit value=login name=login style=width: 50px; heigth: 18px; font-size: 12px/p/td /tr /table /form 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. Cheers Stuart - Original Message - From: [EMAIL PROTECTED] To: PHP_DB [EMAIL PROTECTED] 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 www.simradusa.com [EMAIL PROTECTED] 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 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[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 www.simradusa.com [EMAIL PROTECTED] 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 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] keeping form field data when reloading a form
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=#ff tr td align=leftp class=smallbUsername:/b/p/td td align=leftinput type=text name=username value=?php echo $username;? maxlength=50 size=15 style=width: 120px; font-size: 12px/td /tr tr td align=left p class=smallbPassword:/b/p/td td align=leftinput type=password name=password maxlength=50 size=15 style=width: 120px; font-size: 12px /tr tr td align=leftpnbsp; /p/td td align=leftpinput type=submit value=login name=login style=width: 50px; heigth: 18px; font-size: 12px/p/td /tr /table /form 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. Cheers Stuart - Original Message - From: [EMAIL PROTECTED] To: PHP_DB [EMAIL PROTECTED] 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 www.simradusa.com [EMAIL PROTECTED] 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 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] keeping form field data when reloading a form
Chip: Just use the names of the fields as the values too: input type='text' name='Email' value='$Email' / HTH :-) Russ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 1:58 AM To: PHP_DB 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 www.simradusa.com [EMAIL PROTECTED] 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 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php