function some_name() {
if (document.getElementById('first').checked)
document.getElementById('second').checked=true;
else
document.getElementById('second').checked=false;
}
<?php
$idno = $vt->veriTemizle($_GET['idno']);
$rest = $vt->sqlSorgu("Select * From rest ");
foreach($vt->fetch_assocAll() as $rest){
echo '
<input type="checkbox" name="option1[]" onclick="some_name();" id="first" value="'.$rest["price"].'" />
<input type="hidden" name="extra[]" onclick="some_name();" id="second" value="'.$rest["productname"].'-'.$rest["price"].' " />
';
}
?>
hi there is a code i have been trying to do for a long time. I have to select another one when the checkboxes listed above are clicked.
the first record listed is working, others are not Thank you from now
Aucun commentaire:
Enregistrer un commentaire