Radio Buttons insert values to DB but are not marked on update form
I have a simple radio group on an update form that allows people to specify their preferred method of contact, Phone or Cell.
The buttons insert the correct values Phone or Cell into the database, but when going back to the update form, the values are not marked.
So if a user updates the form without clicking one of the buttons again, the initial selection is removed from the db.
I bound the radio group to the table using the Bind to Dynamic Source button with this result:
<label>
<input <?php if (!(strcmp(((isset($_POST["prefContact_usr"]))?$_POST["prefContact_usr"]:""),"Phone"))) {echo "checked=\"checked\"";} ?> name="prefContact_usr" type="radio" id="prefContact_usr_0" value="Phone" />
Phone</label>
|
<label>
<input <?php if (!(strcmp(((isset($_POST["prefContact_usr"]))?$_POST["prefContact_usr"]:""),"Cell"))) {echo "checked=\"checked\"";} ?> name="prefContact_usr" type="radio" id="prefContact_usr_1" value="Cell" />
Cell</label>
Should I be binding the group in a different way.
Any help will be greatly appreciated.
Paul Bda