Jump to content

Search While Submit


ksumanth

Recommended Posts

I my form i have 4 fields like gender, fromage& toage, religion , caste. I need to search either one condition have to satisfy or two conditions have to satisfy or three condtions have to satisfy. I did like if all 3 conditions satisfy it will search. Can any one tell me how to

 

My coding is

$sql = "select * FROM profile_details where Caste='$caste' and gender='$gender' and Age between '$fromage' and '$toage'";

<?

$selmetas=mysql_query($sql);

if (mysql_num_rows($selmetas)>0) {

while($resmetas=mysql_fetch_assoc($selmetas))

{

$religion=$resmetas['religion'];

$caste =$resmetas['Caste'];

$Age=$resmetas['Age'];

?>

 

<? }

}

else {

?>

<?

echo "No results found.";

 

}

?>

Link to comment
https://forums.phpfreaks.com/topic/272246-search-while-submit/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.