Hello.
As the title says I have a mySQL database. I would like to put a search box on my website pages so that users can type one or more words in and find corresponding entries in my database.
I have spent hours on Google searching things like "mySQL search", "mySQL fulltext search", "mySQL search engine", etc, but I have had no luck. Three times I tried to implement a script but it did not function correctly. One time there was a tutorial article that looked promising but at the end after inspecting the various user comments the last person said there were major security breaches and the database would get hacked (I think "injection" was the term). All the other things I found on Google either it was not what I was looking for or I could not understand it well enough to implement the script (or I could not understand it well enough to determine if it was or wasn't what I was looking for ).
So I'm just looking for a reeeeally simple script here, which I think should be extremely easily availabe! Except it is not so easily available, apparently... one thing I like about posting on a forum like this, is that if one poster gives me a not-so-good response, others will correct him, so overall I know I won't be wasting my time, I know y'all can give me the right solution (and that does not leave me too vulnerable to security threats)!
From what I have learnt in my search so far, all I would need to do to the script is obviously edit in my database name, username, password etc, and also specify which table and columns to search (I would only search a single column in my table). So really if this is correct, what I seek to do is extremely easy, I only need to add a small handful of things!... I just need to find the correct script. I would also like to be able to display results on different pages (ex: max ten results per page) and all the other basic stuff like allow the user to specify with quotation marks their search terms or use a + sign to specify more than one search term, etc. I do not need the search terms to be highlighted in the results, but if that's already in your script then it's no problem I will take it.
I hope some of you would know good websites to refer me to, that would contain the script I'm looking for! I hope it's as simple as I have in my mind, and that I can accomplish this pretty easily with all your help.
Thanks in advance for any assistance, it is so much appreciated!
PS - I think there are programs I could download to my server that would allow me to search, but this is too complicated for me, and I'm going to change servers sometimes so I would rather just have a script I can easily copy from place to place, and that it doesn't have all the bells and whistles is better for me because they would just complicate my life.
PPS - Please if you can indicate where I put your script on my page, for example does it go before <html> or does it go between <body> and </body> or does some go one place and other parts go another place, etc.. sometimes this has caused me confusion, so thank you for clarifying.