i was just wondering if i could get the values of two different drop downs then pass it on jquery to back to php?
you see i have these two drop downs. one for the month and one for the year.the user could choose which month and year she/he would like then the display on the graph would change depending on the month and year chosen.i was able to do it for a single drop down but i can't do it on two drop downs.
<script type="text/javascript">
$(document).ready(function()
{
$("#months").change(function(event)
{
var m=$(this).val();
if( m == '00')
{
}
else if(m!='00' || m!='NULL')
{
$("#display").load('../crd_reports/month.php', {"m":m});
}
});
$("#years").change(function(event)
{
var y=$(this).val();
if( y == '10')
{
}
else if(y!='10' || y!='NULL')
{
$("#display").load('../crd_reports/month.php', {"y":y});
}
});
});
</script>
<div>
<select id="months">
<option value='00'>Month...</option>
<option value='01'>Jan</option>
<option value='02'>Feb</option>
<option value='03'>Mar</option>
<option value='04'>Apr</option>
<option value='05'>May</option>
<option value='06'>June</option>
<option value='07'>July</option>
<option value='08'>Aug</option>
<option value='09'>Sept</option>
<option value='10'>Oct</option>
<option value='11'>Nov</option>
<option value='12'>Dec</option>
</select>
<select id="years">
<?php
for($yr=10; $yr<=$year; $yr++)
{
echo "<option value='".$yr."'>".$years[$yr]."</option>";
}
?>
</select>
</div>
this is the start of my month.php
<?php
if (isset($_REQUEST['m']))
{
$m = $_REQUEST['m'];
// $y = $_REQUEST['y'];
include '../../include/dbconnect.php';
?>