Jump to content

[SOLVED] Php MySql Simple Search


kickoutbettman

Recommended Posts

Hello all,

I'm starting from scratch and only have a basic idea of what needs to be done.

So I want to have a user search for a golf course. He can search for the city name, the golf club name or the course name, all within the same search field (if that is possible).

 

Here's my 3 DB table

 

CITY

cityName

state

country

 

GOLFCLUB

cityName

golfClubName

 

COURSES

idCourse

courseName

golfClubName

 

What I would like to do is to have 1 search field

<input name="searchField">

and the user can search for a city,club or courses without having to choose what he's searching for (because he might don't know if it's the clubName or the courseName).

 

For the display result I would like (again if it's possible) to have the courses as the result (even if the user search for a city, I want all the courses from that city to be listed)

 

I know I'm asking a lot, but I would like to start with a sample script that can meet my needs. I never made a search engine before.

 

Thank you very much

Link to comment
https://forums.phpfreaks.com/topic/158958-solved-php-mysql-simple-search/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.