mercredi 6 janvier 2016

How to get checkboxes remained checked after being checked in another device

I am facing some issues trying to get checkboxes to stay checked in another device, I am able to get check boxes stay checked within the browser, so after the browser refreshed, the checkboxes remained checked, so is there any idea how i can do this?

so here is my code, firstly i included the dcConnect.php to connect to the database then i retrieve the data from the database to be displayed on a website

<?php
include_once("dcConnect.php");

$dcData = "SELECT dcID, dcServerName, dcServerAge, dcServerGender, dcServerMarital FROM dcUsers";

$result = $link->query($dcData);

if($result->num_rows >0){
    echo"<table><tr><th></th><th>ID</th><th>Name</th><th>Age Group</th><th>Gender</th><th>Marital Status</th></tr>";
    while($row = $result->fetch_assoc()){
        echo"<tr><td><input type='checkbox' id='". $row["dcID"] ."' name='". $row["dcID"] ."' value='off' ></input></td><td>". $row["dcID"] ."</td><td>". $row["dcServerName"] ."</td><td>". $row["dcServerAge"] ."</td><td>". $row["dcServerGender"] ."</td><td>". $row["dcServerMarital"] ."</td></tr>";




    }
    echo "</table>";

    }else{
        echo"no results";

    }

$link->close();



?>

Here is my website where the check boxes can stay checked after refreshed but not in another device http://ift.tt/1TFM3la




Aucun commentaire:

Enregistrer un commentaire