Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   1,000 Directory Submissions   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 03-23-2008, 08:02 AM   #1 (permalink)
Junior Member
 
Join Date: 03-21-07
Posts: 19
iTrader: 0 / 0%
Latest Blog:
None

basketmen is liked by many
Form output using mysql, search people name in specific category

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  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 03-23-2008, 12:21 PM   #2 (permalink)
Contributing Member
 
Join Date: 06-29-07
Posts: 110
iTrader: 0 / 0%
mangome is liked by many
you need another list for categories.
__________________
Team Aguilar sells San Diego Foreclosures and also provides Real Estate Short Sale Services to help homeowners sell their home and avoid foreclosure.
mangome is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-25-2008, 01:28 PM   #3 (permalink)
Contributing Member
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,007
iTrader: 0 / 0%
Latest Blog:
None

Izzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to behold
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
Thumbs up Here you go

Basketmen,
Looking at your code, you have radio buttons, and in that list, you can only select 1 item. You will need to set those as "checkboxes".

Once you get that done, you need simple do:
PHP Code:
if(isset($_POST["people_name_just_from_adult_category"]))
    
$sql "SELECT people_name,people_category FROM people WHERE people_name = '".$_POST["people_name"]."' AND people_category = 'adult'";
else
    
$sql "SELECT people_name,people_category FROM people WHERE people_name = '".$_POST["people_name"]."'"
If you need any more help, I'd be of some assisstance.
__________________
~Izzmo
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-26-2008, 04:35 AM   #4 (permalink)
Contributing Member
 
Join Date: 06-29-07
Posts: 110
iTrader: 0 / 0%
mangome is liked by many
can you provide more info on what you want?
__________________
Team Aguilar sells San Diego Foreclosures and also provides Real Estate Short Sale Services to help homeowners sell their home and avoid foreclosure.
mangome is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple PHP / Mysql form !! Kinetic_Mix Coding Forum 1 07-28-2006 01:18 PM
Input (FORM) - Output (EMAIL)...Help me! maptomal Coding Forum 1 05-07-2006 12:23 PM
Post Links from a Specific Category sixty6 Blogging Forum 5 04-27-2006 08:36 PM
creating category structure php mysql robpicken Coding Forum 4 08-23-2004 12:24 PM
Niche specific search engines altyfc Marketing Forum 5 01-05-2004 09:10 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:35 AM.
© Copyright 2008 V7 Inc