mercredi 16 juin 2021

Is it possible to call the checkbox function in a view to another view? So if one is checked, the statement shows

I would like to call a statement from another view, which if i click the print report, the statement show if I clicked like this the print button call function of these

And this is my view page which give options

the first view code

<label class="radio-inline">
<input type="checkbox" value="up" name="stats" >Naik kelas
</label>
<label class="radio-inline">
<input type="checkbox" value="stay" name="stats" >Tidak Naik kelas
</label>

And this is the printreport view enter image description here This code is used to call from first view to this view. So if we click which value is up, as i mentioned in first image, it shows statement in the button.

<?php if (isset($_POST['stats']) == 'up') { ?>
<br>Naik Ke Kelas ............... (.....) atau Tinggal di Kelas ............... (.....)</td>
<?php } ?>

However, the output did not called even I clicked or not as in this picture. I try using in my view using isset did not worked. enter image description here

and this is my controller controller to access print report

Anyone know how to solve it so the statement is appeared if selected one?




Aucun commentaire:

Enregistrer un commentaire