Welcome Guest, Not a member yet? Register   Sign In
radio buttons from database[SOLVED]
#1

[eluser]bobbob[/eluser]
I am sure this has an easy explanation but it is eluding me.

I have a couple of radio buttons with yes and no as the choice:

Code:
<tr>
        <td>Insured</td><td>Yes&lt;input type="radio" name="insured" value="Yes" &lt;?php echo set_radio('insured','Yes'); ?&gt;"&gt;&nbsp;&nbsp;&nbsp;No&lt;input type="radio" name="insured" value="No" &lt;?php echo set_radio('insured','No'); ?&gt;"&gt;&lt;/td>
    </tr>

For signing up this works fine and the form validation works if they didn't choose one.

Now when the user needs to edit their info. Completely different page as the form is now presented populated with their info from the database. When I recreate the form how do I get

$row->insured into the radio button so the correct Yes or No is preselected?
Tx


Messages In This Thread
radio buttons from database[SOLVED] - by El Forum - 04-04-2009, 08:40 PM
radio buttons from database[SOLVED] - by El Forum - 04-05-2009, 12:29 AM
radio buttons from database[SOLVED] - by El Forum - 04-05-2009, 09:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB