Category : checkbox

I have this field <input class="red-heart-checkbox " name="photo[]" type="checkbox" value="<?php echo $id; ?>" id="<?php echo $id; ?>" data-img="<?php echo $imageURL; ?>"/> And I would like to make a list of image with url image from the data-img checked but I only have values with this code : <script> $(function() { var masterCheck = $("#masterCheck"); var ..

Read more

I have this table into a modal form: <div class="form-group"> <!– Record list –> <table id="tabscarichi" class="table table-bordered table-striped" style=’border-collapse: collapse;’ > <tr style=’background: whitesmoke;’> <th>Check</th> <th>Id</th> <th>Formulario</th> <th>EER</th> <th>Data FR</th> <th>Q.tà</th> </tr> <?php $query = "SELECT * FROM registro_c_s where stato_carico=’1’"; $result = mysqli_query($conn,$query); while($row = mysqli_fetch_array($result) ){ $id = $row[‘id’]; $fr = $row[‘formulario’]; ..

Read more

I’m trying to update a MySQL table from an html form. This is a piece of the form: <div class="modal-dialog"> <form method="post" id="employeeForm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title"><i class="fa fa-plus"></i> Edit User</h4> </div> <div class="modal-body"> <div class="form-group"> <label for="tipoOp" class="control-label">Operazione:</label> <select id="tipo" name="tipo" class="form-control"> <option value="carico">Carico</option> <option value="scarico">Scarico</option> </select> </div> ..

Read more

$counter = 1; if($result){ foreach($option_marks as $option => $value){ if($value == 1){ $is_correct = 1; }else{ $is_correct = 0; } //Second Query for Choices Table $query = "INSERT INTO options ("; $query .= "question_number,choice,correct)"; $query .= " VALUES ("; $query .= "'{$question_number}’,'{$choice[$counter]}’,'{$is_correct}’"; $query .= ")"; $counter++; $insert_row = mysqli_query($connection,$query); } $message = "Checkboxes question added ..

Read more

When you tick the optional checkbox to subscribe to my newsletter on my html form and when you submit the form, my Mysql Database entry "newsletter_subscribe_yes" column shows NULL entry. Why ? Particular Form Input <label for="newsletter_subcribe_yes">Newsletter Subcribe:Yes</label> <input type="checkbox" name="newsletter_subcribe_yes" id="newsletter_subcribe_yes" value="Newsletter Subcribe:Yes"> <br> Full Form Submission Script <?php ini_set(‘display_errors’,’1′); ini_set(‘display_startup_errors’,’1′); error_reporting(E_ALL); ?> <form ..

Read more