Problem in php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adilmarwat2004
Forum Commoner
Posts: 44
Joined: Fri Sep 04, 2009 11:28 pm

Problem in php?

Post 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
manojsemwal1
Forum Contributor
Posts: 217
Joined: Mon Jun 29, 2009 4:13 am
Location: India

Re: Problem in php?

Post 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
jegan.aaodis
Forum Newbie
Posts: 15
Joined: Fri Oct 09, 2009 1:56 am

Re: Problem in php?

Post 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
adilmarwat2004
Forum Commoner
Posts: 44
Joined: Fri Sep 04, 2009 11:28 pm

Re: Problem in php?

Post 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
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Problem in php?

Post by jackpf »

So what have you tried so far..?
Post Reply