lundi 29 décembre 2014

select and create checkbox list in php itself

I have written php code to generate dynamic checkbox list.I want to accept that checkbox checked value and use it furthur to display another checkbox list in php itself.


//Here's the code...



if($db_select=mysqli_select_db($conn,$db_value)) {
echo "selected database ".$db_value."\n";
}
echo "<br>";

echo "\n"." Select Tables : ";

$table="show tables from $db_value";
$result=mysqli_query($conn,$table);
while($row=mysqli_fetch_array($result)){
echo "<br>";
echo "<input type='checkbox' name='checklist[]' value='{$row[0]}'>{$row[0]}</input>";
}
echo "<br>";
echo "<input type='submit' value='validate' name='ok'>";
?>


I want to accept name='ok' and print another checkbox using php. How can I do it?





Aucun commentaire:

Enregistrer un commentaire