jeudi 8 novembre 2018

update checkbox value using php

I need to update the status.If the status is active it will be ticked else it will be un ticked.

Used $status = $_GET['status']; .But its empty.How can i solve this

<tr>
            <td><?php echo $id ?></td>
            <td><?php echo $site_url; ?></td>
            <td>
            <?php if($status == "1"){ ?>

            <input type="checkbox" name="status" value="Yes" checked ="true" >
            </td>
            <td>
            <?php }if ($status == "0"){ ?>

            <input type="checkbox" name="status" value="No"  >
            </td>
            <?php } ?>
            <td>    <a href="this_page.php?update=<?php echo $site_url; ?>" class="edit_btn" >Update</a></td>   
            </tr>




Aucun commentaire:

Enregistrer un commentaire