Acute Chaos
08-30-2011, 07:40 PM
I have a members' site and on the admin's page where they update the member info I have created a form with a field for each piece of information.
Each field is filled in with information drawn from session vars.
For example the email field has this:
<input name="email" type="text" id="email" value="<?php echo $_SESSION['email'];?>" />
Works perfect. But I don't know how to assign a value to a radio button so it has an appropriate preselected value.
How do the same kind of thing with my session info for this:
<input name="color" type="radio" value="Red" />Red <br />
<input name="color" type="radio" value="Blue" />Blue
Meaning if the session shows the database has 'Red' as the current value how can I make that the preselected value when the form displays.
Thanks!!!
Each field is filled in with information drawn from session vars.
For example the email field has this:
<input name="email" type="text" id="email" value="<?php echo $_SESSION['email'];?>" />
Works perfect. But I don't know how to assign a value to a radio button so it has an appropriate preselected value.
How do the same kind of thing with my session info for this:
<input name="color" type="radio" value="Red" />Red <br />
<input name="color" type="radio" value="Blue" />Blue
Meaning if the session shows the database has 'Red' as the current value how can I make that the preselected value when the form displays.
Thanks!!!