20.if($_GET["datestart"] != "" and $_GET["dateend"] != "")
21.{
22.$objConnect = mysql_connect("root","joe","91199") or die("Error Connect to Database");
23.$objDB = mysql_select_db("joe");
24.$strSQL = "SELECT * FROM `buymaster` WHERE date BETWEEN '{$_GET["datestart"]}' AND '{$_GET["dateend"]}' ";
25.$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
26.