samedi 21 mars 2020

Type for record a checkbox with phpmyadmin

Hy

What is the good type in phpmyadmin to record a checkbox?

enter image description here

I use bootstrap for in css library, and my code for add a ckeckbos is this.

<!-- Sign Up Modal -->
<div class="modal fade" id="SignUpModal" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <form action="login.php" method="POST">
                <div class="modal-header border-bottom-0">
                    <h4 class="modal-title">Sign Up</h4>
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <input type="fname" class="form-control" id="firstname" placeholder="First Name" name="firstname" required>
                    </div>
                    <div class="form-group">
                        <input type="lname" class="form-control" id="lastname" placeholder="Last Name" name="lastname" required>
                    </div>
                    <div class="form-group">
                        <input type="email" class="form-control" id="email" placeholder="Email" name="email" required>
                    </div>
                    <div class="form-group">
                        <input type="password" pattern="^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=\S+$).{8,32}$" maxlength="32" class="form-control" id="password" placeholder="Password (8 characters min, with capital and number)" name="password" required>
                    </div>
                    <div class="form-group">
                        <input type="date" class="form-control" id="date" placeholder="Date of birthday" name="date" required>
                    </div>
                    <div class="modal-footer border-top-0">
                        <div class="form-group form-check">
                            <label class="form-check-label">
                                <input class="form-check-input" type="checkbox" id="checkbox" name="terms" required>
                                You agree to the <a href="/terms" class="text-decoration-none">Baseprod Terms.</a>
                                <div class="valid-feedback">Valid.</div>
                                <div class="invalid-feedback">Check this checkbox to continue.</div>
                            </label>
                        </div>
                        <button key="isset" type="submit" class="btn btn-success" data-dismiss="modal" value="submit" name="submit_btn">Sign Up</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- Sign Up Modal -->

Good for you.




Aucun commentaire:

Enregistrer un commentaire