dimanche 7 juillet 2019

how to edit already filled radio buttons from data base

how do i edit already filled buttons from data base and have the new selected option selected once i submit the form. i tried this code below but onnly works when i refresh the page.

<label for="shopping">Shopping?</label></br>
    <span class="yes">Yes</span><input class="check" type="radio" name="shopping" 
    <?php if ($newShopping == "1" || $shopping == "1") {echo "checked";} ?> value="1" />
    <span class="no">No</span><input class="check" type="radio" name="shopping" 
    <?php if ($newShopping == "0" || $shopping == "0") echo "checked"; ?> value="0" />

Aucun commentaire:

Enregistrer un commentaire