<?PHP
if(".$_GET["country"]."='All')
{
$sql = "SELECT * FROM data WHERE name LIKE '%".$_GET["txtKeyword"]."%' ORDER BY id DESC ";
}
esle {
$sql = "SELECT * FROM data WHERE name LIKE '%".$_GET["txtKeyword"]."%' AND ( country LIKE '%".$_GET["country"]."%') ORDER BY id DESC ";
}
พอทดสอบโค๊ดแล้ว show error
Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING
ตรงบรรทัด if(".$_GET["country"]."='All')
<?PHP
if($_GET["country"]='All')
{
$sql = "SELECT * FROM data WHERE name LIKE '%".$_GET["txtKeyword"]."%' ORDER BY id DESC ";
}
else {
$sql = "SELECT * FROM data WHERE name LIKE '%".$_GET["txtKeyword"]."%' AND ( country LIKE '%".$_GET["country"]."%') ORDER BY id DESC ";
}