I have a column in the MySQL database that stores data as Date 17-6-2021 for example
the user choose a month and year from input fields as follow
<form method="POST">
<table>
<tr>
<td><label>choose month</label></td>
<td><input name="month">
</tr>
<tr>
<td><label>choose year</label></td>
<td><input name="year">
</tr>
</table>
<input type="submit" name="add1" value="submit">
</form>
I want to compare the date chosen by the user with dates stored in the database to get all values within the month and the year what function should I use?? my purpose here is to generate a monthly report based on user choices