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
Problem in php?
Moderator: General Moderators
-
manojsemwal1
- Forum Contributor
- Posts: 217
- Joined: Mon Jun 29, 2009 4:13 am
- Location: India
Re: Problem in php?
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
You want to enter roll no in text box and in drop down menu what do you want to display.?
Manoj
-
jegan.aaodis
- Forum Newbie
- Posts: 15
- Joined: Fri Oct 09, 2009 1:56 am
Re: Problem in php?
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
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
-
adilmarwat2004
- Forum Commoner
- Posts: 44
- Joined: Fri Sep 04, 2009 11:28 pm
Re: Problem in php?
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
Roll#
Name
Domicile.
and to display the require result
Roll# Name Domicile
1 Max Wash
Re: Problem in php?
So what have you tried so far..?