samedi 25 avril 2020

HTML how do a condition: if checkbox was ever changed

i have an html file like this:

<article class="question">
    <input id="revert" name ="revert" type="checkbox">
    <label for="revert">
        <section  class="front">
            <?php echo $question ?>
        </section>

        <section class="back">
            <?php echo $answer ?>
        </section>
    </label>
</article>

<form method="post">
    <input type=text name="reponse" placeholder="Ecrivez votre réponse ici"/>
    <input type=submit name="envoi_reponse" id="envoi_reponse_1" value="Envoyer"/>
</form>

i want to see in PHP, if the checkbox "revert" was changed or not, i don't want to see if it's checked, i need to know if it was ever changed. So if the user check it, and then uncheck then the condition = true

Maybe with some javascript ? I don't know js but i can try to use it, if it's not super hard




Aucun commentaire:

Enregistrer un commentaire