Jump to content

Php Search


ColdEdge

Recommended Posts

I am pretty sure that the Search Feature here is a php Datbase search feature.No Ajax involved.Start by learning some php and mysql to perform a search of your Database.First, of course, you need to build the content, so perhaps a Content management system would be a good tool for you? Lots of them available and most of the current ones include a Search feature.Google Joomla and sNews CMS

Link to comment
Share on other sites

As i stated i wish to use PHP+AJAX based search engine that echos internal XML file some thing like YouTube has or and one of the examples over here at W3Schools.com the problem is that it expands the page when the result drop down do to this i require the following modifications.1- YouTube style dropdown so it goes over my website layout not in it making it bigger and bigger.2- If user inputs a request for "A" titled contence he or she will only get a list of contence titles that start off with "A" not like the curent one which will load anything that has a letter in it, an example: User searched "B" they will get Block, Blade, Bee not Webmail, MyBB or any other word that contain the letter some where in it so basicly just the first letter titles are shows.I suppose i have not provided a clear request help, while posting this post but i did state that it is on W3Schools and it looks something like youtube. PHP+MySQL search engine is too comples while my site includes a CGI search engine i dont seem to understand what it means and where can i store the file which can be queried in my cPanel->File Mannager.<!--- EDITED ---!>Here is the link "Jlhaslip" http://www.w3schools.com/php/php_ajax_livesearch.asp as you can see it is a PHP+AJAX Livesearch

Link to comment
Share on other sites

For a floating dropdown, do some searching on floating CSS layers. That can be a div with absolute positioning, for example, that's one way to do it. To get things to search for words starting with what you type, leave off one of the wildcard characters in the SQL statement. e.g. instead of this:SELECT ... WHERE field LIKE '%...%'do this:SELECT ... WHERE field LIKE '...%'

Link to comment
Share on other sites

@ JustsomeguyI am sorry but i do not get where your going with the SQL Search, all I need is some help to modifie the PHP+AJAX search that is provided here which echos "XML" file for data. And I am sorry but i could not find that CSS comand =(

Link to comment
Share on other sites

For the XML search, you can change this line in the PHP script:if (stristr($y->item(0)->childNodes->item(0)->nodeValue,$q))to this:if (strpos(strtolower($y->item(0)->childNodes->item(0)->nodeValue),strtolower($q)) === 0)For the other issue, check here:http://www.google.com/search?client=opera&...-8&oe=utf-8

Link to comment
Share on other sites

  • 3 weeks later...
Guest morten

Sorry for bumping an old topic.I have the following xml data to search:"option 1 - red, blue, green", "option 2 - magenta, black, green", "option 3 - green, blue, yellow"When I search for "blue", I get"Option 1 - red, blue, green""Option 3 - green, blue, yellow"But I need to be able to search for multiple items, ex. "blue yellow", which will output"Option 3 - green, blue, yellow"The user will input the colors he prefers, and the autocomplete will output the Option that matches. Do you know how to do this?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...