Re: [PHP-DB] how to preseve value of radio-butons when form is refreshed?
Hector, You can do it all in one script, and for the best explanation go to http://www.thickbook.com and check out the tutorials. I believe you want the one which deals with custom error messages. You can find similar examples on DevShed and Weberdev. Essentially your script is divided into two halves. All logic is embedded in the top half, display is in the bottom half, with what is displayed conditional on the results of the logic. Miles At 10:29 AM 6/28/01 -0700, Hector M Banda wrote: >Hi all, >How can I keep the values of objects like radio buttons on a PHP page >when the page is refreshed? > >What I mean is that I 'm using the same form to interact with the user >and to display the information based on the output of a particular >query. > > >Thanks, > >-- > > >-hb > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] how to preseve value of radio-butons when form is refreshed?
Lets say you have the following inputs: And you wanted MrCheckBox to be marked, and the ColorPreference to be Brown. You would have PHP output this: I normally do this: 1. Retrieve Info from DB 2. If ( ColorPreference = Green ) { $GreenChecked = "CHECKED"; } elseif ( ColorPreference = Brown ) { $BrownChecked = "CHECKED"; } This way, one of those variables will contain the word CHECKED, which will in turn, mark the desired radio button. - jonathan "Hector M Banda" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > How can I keep the values of objects like radio buttons on a PHP page > when the page is refreshed? > > What I mean is that I 'm using the same form to interact with the user > and to display the information based on the output of a particular > query. > > > Thanks, > > -- > > > -hb > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]