Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Form output using mysql, search people name in specific category
Old 03-23-2008, 10:55 AM Form output using mysql, search people name in specific category
Skilled Talker

Posts: 78
Name: syu
Trades: 0
I have search php forms that connecting to mysql, for search people name in all category and search people name in specific category

People name field in mysql : people_name , example : John, Michael, etc
category name field in mysql : people_category , example : Kid, Adult, etc


I can Search All People name using first option value below, for example i search : John

beside that i want to search : John only in adult category

what is the right code so i can get people name just from adult category



Quote:
<select name="metode" size="1">
<option value="people_name">Search All People</option>
<option value="people_name_just_from_adult_category">Search People By Category</option>
</select>
<input type="text" name="search" size="25">
<input type="submit" value="Search" name="Go" />





Please share your php mysql knowledge here
basketmen is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-23-2008, 06:58 PM Re: Form output using mysql, search people name in specific category
Novice Talker

Posts: 3
Trades: 0
Quote:
$x = mysql_query("SELECT * FROM people_name WHERE category='adult'");
$t = mysql_fetch_rows($x);

while($n = $t) {
the <option>'s
}
Like that?

Last edited by outthislife; 03-23-2008 at 08:01 PM..
outthislife is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Form output using mysql, search people name in specific category
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15834 seconds with 12 queries