I have a form that I want to edit the values from the database. I am able to update all my values except for the radio boxes populated from my database. After my UPDATE command, the value being grabbed is the initial checked value from the database.
<?php $db_maritalstatus = $row_rsAdvancedPlan['maritalstatus']; ?>
<input name="maritalstatus" id="maritalstatus" value="single" <?php echo ($db_maritalstatus == "single") ? ' checked="checked"' : '' ?> type="radio" /> <label for="single" class="smaller">Single</label>
Then I use this code to grab new value, but it grabs the checked value initially loaded from database
$maritalstatus = mysql_real_escape_string($_POST['maritalstatus']);