Jump to content

Not ticking write radio button


Xtremer360

Recommended Posts

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>';
                }
            ?>

Link to comment
https://forums.phpfreaks.com/topic/225116-not-ticking-write-radio-button/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.