Hi Friends...
I want a small help...
I want to create a search page, in which if No entries are
given all the data in the database should be shown and
remaining all same as the function of a multiple search page.
Can U help me in creating the second page, Displaying results in PHP.
A part of my search page is given...
(t1, t2, d1, t3, t4 are text boxes and a Drop down Menu)
$qry="select * from dbloba";
$join=" where ";
if ($t1 !="")
{
$qry=$qry.$join."name like '".$t1."'%";
$join=" and ";
}
if($t2 !="")
{
$qry=$qry.$join."place like '".$t2."'%";
$join=" and ";
}
if($d1 !="All")
{
$qry=$qry.$join."occupation= '".$d1."'";
$join=" and ";
}
if($t3 !="")
{
$qry=$qry.$join."batch like '".$t3."'%";
$join=" and ";
}
if($t4 !="")
{
$qry=$qry.$join."classid like '".$t4."'%";
}
if ($t1=="" && $t2=="" && $d1=="All" && $t3=="" && $t4=="")
{
$qry=mysql_query("select * from dbloba");
}
The remaining part is OK with me....
Please HELP me with the above code.....
Bye...