I want to display data between two dates. But I want to be able to choose these two dates. I do not know where and how to store these dates in order to be able to add a variable to SELECT. Please be very specific when you reply. Thank! This is what my code looks like:
<div class ="row"> <div class ="col-md-3"> <form action="" method="post" role="form"> <div class="form-group"> <label for="startdate">Start date:</label> <input class="form-control" type="date" name="startdate" id="startdate" > </div> <div class="form-group"> <label for="enddate">Ending date:</label> <input class="form-control" type="date" name="enddate" id="enddate" > </div> <button type="submit" class="btn btn-default">Submit</button> <input type="hidden" name="submitted" value="1" /> </form> </div> </div> <div class="panel panel-default"> <table class="table"> <thead> <th>Nume</th> <th>Prenume</th> <th>Serviciu</th> <th>Data</th> <th>Ora</th> <th>Email</th> <th>Telefon</th> <th>Status</th> </thead> <?php $query = "SELECT * FROM rezervari2 ORDER BY data ASC"; $result = mysqli_query($dbc, $query); while($list = mysqli_fetch_assoc($result)){ $list = data_rezervare($dbc, $list['idrezervare']); ?> <tr> <td><?php echo $list['nume']; ?></td> <td><?php echo $list['prenume']; ?></td> <td><?php echo $list['serviciu']; ?></td> <td><?php echo $list['data']; ?></td> <td><?php echo $list['ora']; ?></td> <td><?php echo $list['email']; ?></td> <td><?php echo $list['telefon']; ?></td> <td><?php echo $list['status']; ?></td> </tr> <?php } ?> </table> </div>
php select
user3572552 May 27 '15 at 17:42 2015-05-27 17:42
source share