I have this function where i want to pass the month and year according to the date drop down that is chosen by the user. But can’t seem to get the selected month and year. But instead, i got the month and year for now (which is April 2020). Can any one show me how can i achive this? I mean how can i pass the month and year selected to my allreport-summary.php
page. It would be better if you guys can show me examples of codes on how can i implement this. Any help will be appreciated. Thank you so much. cheers!
<div class="row">
<div class="col-4 my-auto">
<input type="month" id="month" class="form-control" value="<?php echo date('Y-m'); ?>">
</div>
<div class="col-4 my-auto">
<select class="form-control" id="seller">
<option value="">Select All</option>
<?php
$sql = "SELECT * FROM sellers ORDER BY seller_registered";
$query = $conn->query($sql);
while ($row = $query->fetch_assoc()) {
?>
<option value="<?php echo $row['id'];?>"><?php echo $row['seller_fullname'];?></option>
<?php } ?>
</select>
</div>
<div class="col-4">
<button type="button" class="btn btn-info" onclick="loadreports();">
<i class="nc-icon nc-zoom-split"></i>
</button>
<a href="allreport-summary.php?month=<?php echo date('Y-m');?>">
<button type="button" class="btn btn-info" style="height: 40px;">
<i class="fa fa-file-excel-o"></i> Export All Report
</button>
</a>
</div>
how can i pass that <a href="allreport-summary.php?month=<?php echo date('Y-m');?>">
according to the selection of <input type="month" id="month" class="form-control" value="<?php echo date('Y-m'); ?>">
?