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
Old 01-03-2008, 10:33 AM PHP search options
Average Talker

Posts: 26
Name: Sylvia
Trades: 0
I need to make my two search options, “female workout buddy” & “Male workout buddy” searchable for members. Right now if someone is looking for a female or male workout buddy no results will display. The majority of the girls on my site are just looking for a female workout buddy so all of them should show in the results.


Here is the thread to the forum post that explained to me how to do this:http://forum.tufat.com/showthread.php?t=40567


Here's my post: http://forum.tufat.com/showthread.php?t=43727


I attached screen shots. I added the entries as directed by the makes of the script i'm using into the lang_main.php file. I attached a screen shot of it. They are entries "W" (for Female workout buddy), and "X" (for Male workout buddy).

They only gave me instructions to modify these 3 php files (mymatches.php, searchmatches.php, and lang_main.php). Do I need to modify anything in MySQL databse to make this work?



Please help!
Attached Files
File Type: zip Php_files.zip (44.0 KB, 0 views)

Last edited by SylviaCFT; 01-03-2008 at 10:35 AM..
SylviaCFT is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-04-2008, 01:49 PM Re: PHP search options
Average Talker

Posts: 26
Name: Sylvia
Trades: 0
Ok, ppl look at this as if i'm just adding a search option to my website for a product, its the same thing. Does anyone know how to do that w/ php, and mySQL?
SylviaCFT is offline
Reply With Quote
View Public Profile
 
Old 01-04-2008, 06:31 PM Re: PHP search options
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
Just make a combo box and then query based on that.
PHP Code:
<?php if (isset($_GET['Search']))
{
$result mysql_query("SELECT * FROM database WHERE gender='$_GET[\"partners\"]'") or die(mysql_error());
while(
$row mysql_fetch_array($result))
{
echo 
$row['name']
}
?>
<form action="THISPAGE.php" method="get">
<select name="partners">
<option value="f">Female</option>
<option value="m">Male</option>
</select>
<input type="submit" name="search" value="Find Buddy">
</form>
Im sure there a few errors in what I just wrote but something to that affect.
Truly is offline
Reply With Quote
View Public Profile
 
Old 01-06-2008, 11:36 AM Re: PHP search options
Average Talker

Posts: 26
Name: Sylvia
Trades: 0
Thanx truly, I got it to work, but I don't like how I had to do it. I'll try your way.
SylviaCFT is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP search options
 

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.85326 seconds with 13 queries