$atid = $_POST['atid_s'];
$atname = $_POST['atname_s'];
$atstart = $_POST['atstart_s'];
$attype = $_POST['attypeid_s'];
$tidx = $_POST['tid_s'];
include "connect.php";
$sql = "SELECT * FROM activity where atid like '%$atid%' and atname like '%$atname%' and atstart like '%$atstart%'
and attypeid like '%$attype%' and tid like '%$tidx%'";
$result=mysql_db_query($dbname,$sql) or die (mysql_error());