i am working with quarter reports which i can select the quarter that i want to display. if i select 2nd quarter then it will display. the problem is, i want my report to be specific. for example. i have a dropdown which you can select a year. after that, if i select 2011, after i select it then now i can choose the 1st,2nd,3rd or 4th quarter of 2011.. how am i supposed to do that ? here's my code.
<html>
Select Year: <select name="sortyear" id="sortyear">
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
</select>
<input type = "submit" name = "submit" value = "Select">
</form>
Select year:
<select name="quarter" id="quarter">
<option value="1">1st Quarter</option>
<option value="2">2nd Quarter</option>
<option value="3">3rd Quarter</option>
<option value="4">4th Quarter</option>
</select>
<input type="submit" name="submit" value="Go">
<?
if($_POST)
{
$result=mysql_query("SELECT enrollee_info.*, payments.* FROM enrollee_info INNER JOIN payments ON payments.enrollee_id = enrollee_info.e_id WHERE payments.payment_status='Paid' AND QUARTER(payments.entrydate)='".$quarter."'");
?>
</form>