Page 1 of 1

Problem in php?

Posted: Mon Oct 12, 2009 11:06 pm
by adilmarwat2004
I have mysql database name "prj".

which have one table "inf"
which contains three fields "rollno" "name" "domicile".

i want to make a search form in php that there is a drop down menu connected with "inf" table. and i enter the roll number and show the Roll #, Name & Domicile in result.

please help me in this regard. thanks

Re: Problem in php?

Posted: Tue Oct 13, 2009 1:16 am
by manojsemwal1
Your questions is not clear.

You want to enter roll no in text box and in drop down menu what do you want to display.?


Manoj

Re: Problem in php?

Posted: Tue Oct 13, 2009 1:41 am
by jegan.aaodis
Hi,

First you need to get the post values let it be name , roll no.
You need to set the query as

Select * from table name where name LIKE %$searchkey% or rollno LIKE %$searchkey% or domicile LIKE %$searchkey%

Use this query.

Thanks

Re: Problem in php?

Posted: Tue Oct 13, 2009 1:59 am
by adilmarwat2004
i want to search the form by all three fields like

Roll#
Name
Domicile.

and to display the require result

Roll# Name Domicile
1 Max Wash

Re: Problem in php?

Posted: Tue Oct 13, 2009 5:53 am
by jackpf
So what have you tried so far..?