if($_GET["txtKeyword"] == "" or empty($_GET)
{
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("dbhotel");
mysql_query("SET NAMES utf8");
// Search By Name or Email
$strSQL = "SELECT * FROM customer ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
}
else if($_GET["txtKeyword"] != "")
{
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("dbhotel");
mysql_query("SET NAMES utf8");
// Search By Name or Email
$strSQL = "SELECT * FROM customer WHERE (cus_id LIKE '%".$_GET["txtKeyword"]."%' or cus_email LIKE '%".$_GET["txtKeyword"]."%' )";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
}
?>