How do i create a custom search in PHP?

Ok I'm creating a website with PHP. I've created a text field to allow the user search for any content on the website at the index page, and I want the result displayed in another page called ".../search.php" how do I go about that?
tiimonieAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lukasz ChmielewskiCommented:
Assuming you have your content in the database, just create a form - submitting it will search the database and show the results. Use post or get method in a form, to have the target page displayed with search.php?search=something.

Or not ? You have to be more specific.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tiimonieAuthor Commented:
Nah... I dont want to search the database because most content are on the website 'as-is'. How do i create a custom search on my website? A simple one is used here on EE at the top header - where you perform a search on this website.
0
Lukasz ChmielewskiCommented:
I think ( I know)  the site content is definetely stored in a database: the search is not made within the text files (html) but in the db. Search the database - see the full-text search / other topics related.
Read about the database storing - mysql, mssql.
0
Lukasz ChmielewskiCommented:
One more word. Most of the content as-is is not as-is :). This is just the product of the data retrieval from the mysql(?) database. This is what you should focus on.
0
tiimonieAuthor Commented:
About 'As-is', you are probably right, I mean there's no true way to identify how its been retrieved to the user any way. Thanks! I already have a MySQL database, would consider storing in the DB instead then.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.