samedi 19 août 2017

How to get the value of checkbox without using form and ajax in php?

I have one check box. If any user clicked on checkbox then the value of checkbox pass to the php.

Would you help me in this?

<input class="check-hidden" type="checkbox" value="<?php echo $compare_u;?>" name="compare" id="compare"/>

if ($_POST['compare']) {
$display=$_POST['compare'];
echo $display; 
}




Aucun commentaire:

Enregistrer un commentaire