Xtremer360 Posted January 20, 2011 Share Posted January 20, 2011 It seems to only wanting to tick the enabled radio button even if the row value is 1 for disabled in the database. <?php while ( $row = mysqli_fetch_array ( $result, MYSQL_ASSOC ) ) { echo ' <tr> <td>' . $row['fullname'] . '</td> <td style="text-align:center;"><input type="radio" value="0" name="' . $row['fullname'] . '" class="status"'; if($enabled == 0) echo ' checked="checked"'; echo '/>Enabled'; ?> <?php echo '<input type="radio" value="1" name="' . $row['fullname'] . '" class="status"'; if($enabled == 1) echo ' checked="checked"'; echo ' />Disabled</td> </tr>'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/225116-not-ticking-write-radio-button/ Share on other sites More sharing options...
Muddy_Funster Posted January 20, 2011 Share Posted January 20, 2011 you have neglected to actualy assign anything to $enabled thus it's never going to change with the values from the database. Quote Link to comment https://forums.phpfreaks.com/topic/225116-not-ticking-write-radio-button/#findComment-1162723 Share on other sites More sharing options...
Maq Posted January 20, 2011 Share Posted January 20, 2011 Maybe you meant $row['enabled'] ? Quote Link to comment https://forums.phpfreaks.com/topic/225116-not-ticking-write-radio-button/#findComment-1162724 Share on other sites More sharing options...
Xtremer360 Posted January 20, 2011 Author Share Posted January 20, 2011 TY Quote Link to comment https://forums.phpfreaks.com/topic/225116-not-ticking-write-radio-button/#findComment-1162727 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.