How write this code properly….. Here i am used 3 ‘AND’ and its showing error…Please help me…
if(isset($_GET['datepicker'])){
$mydate = mysql_real_escape_string($_GET['datepicker']);
}
if(isset($_GET['cityText'])){
$city1 = mysql_real_escape_string($_GET['cityText']);
}
if(isset($_GET['categoryValue'])){
$category1 = mysql_real_escape_string($_GET['CategoryValue']);
}
$sql = "SELECT * FROM general WHERE gcity = '$city1' AND day1 = '$mydate' AND category = '$category1'"
You have mispelled your variable name, categoryValue is written once without a starting capital and with a capital on the second time. Variable names are case-sensitive.
Replace
With