0

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']);
2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by jcacquiescent27
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.