Can someone take a double look, and see why I cannot pass my year FILTEr values over to my PHP page...I think its becuase I;m trying to pass "<, >, =, <="...and that is breaking somehting???
I have two search fields: Year and Year_Filter
<input id="year_FIELD" class="easyui-combobox"
name="year_FIELD" data-options=" data: [
{yearID:'',year:'ALL'},
{yearID:'2013',year:'2013'},
{yearID:'2012',year:'2012'},
{yearID:'2011',year:'2011'},
{yearID:'2010',year:'2010'},
{yearID:'2009',year:'2009'}
],
valueField:'yearID',
textField:'year',
panelHeight:'auto'
">
<input id="year_FILTER" class="easyui-combobox"
name="year_FILTER" data-options=" data: [
{value:'', label:'No Filter'},
{value:'=', label:'Equal'},
{value:'<>', label:'Not Equal'},
{value: '>', label:'Greater Then'},
{value:'<', label:'Less Then'},
{value:'>=', label:'Greater Then OR Equal'}
],
valueField:'value',
textField:'label',
panelHeight:'auto'
">
When the search button is clicked...those values are sent the PHP page:
<script type="text/javascript">
function doSearch(){
$('#tt').datagrid('load',{
yearPOST: $('#year_FIELD').combobox('getValue'),
yearFilterPOST: $('#year_FILTER').combobox('getValue')
});
}
</script>
My PHP code captures IS NOT CAPTURING THE YEAR_FILTER Value:
$year_year = isset($_POST['yearPOST']) ? mysql_real_escape_string($_POST['yearPOST']) : '2012';
$year_FILTER = isset($_POST['yearFilter_POST']) ? $_POST['yearFilter_POST'] : '=';
Here is my WHERE statement:
$where = "year_year $year_FILTER $year_year";