Here is some code that shows 2 typical html radio buttons.
Here is some code that shows 2 radio buttons that receive the value from the database. The chosen radio radio selection from the database will be automatically selected. This is a method which could be implemented when updating a database entry. The key is to pull the original values from the databse that were inserted from the original form. With this update page, the new changes can be updated upon submit.
}}
else { echo ‘<input type=”radio” name=”member” value=”yes” /> Yes’;
}?>
<?php
$command= “SELECT col1 FROM counselling_report where id=’$report_id’ AND member=’no'”;
$result = mysqli_query($db, $command);
if ($result && mysqli_num_rows($result) ) {
while ($row = mysqli_fetch_assoc($result)>0) {
echo ‘<input type=”radio” name=”member” value=”no” checked=”checked” /> No’;
}}
else { echo ‘<input type=”radio” name=”member” value=”no” /> No’;
}?>
</p>
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton