Jump to content

totally confused with search tool!


bobeye

Recommended Posts

hey folks,im totally confused with trying to create a search section on my home page which allows users to narrow their search by using small drop boxes, ie, <select country>, then, <select city> and so on.its a pretty big part of my site so iv been searching for a long while now trying to figure it out.anyone know how to do this?

Link to comment
Share on other sites

well im not sure how to take my normal search bar, which is just type a word and get 100 results, and give it the dropboxes to let a user choose a section, in this case an country then city, then press search to give more specific results.

Link to comment
Share on other sites

I suppose you are familiar with a server side language like PHP or ASP right? In that case you'll get the values from the input fields (the text and the select areas) and just add the country/city etc in your query. I'd provide you a sample of the script but i am only familiar with prepared statements, if you need it badly though (and can't write it completely from your own with some guidance) i'll do it.

Link to comment
Share on other sites

this is what i have right now....<div style="margin-middle:-.8em;"><form style="float: right" action="{path}pages/site-search"><inputclass="search-query" style="border:1px solid #DCDCDC; vertical-align: middle;" name="query" value=""/><input src="{path}files/search-icon.png" type="image" style="border: 1px solid #FAFAFA; vertical-align: middle;"/></form></div>

Link to comment
Share on other sites

This just the HTML it doesn't do anything with data. You need to use a server-side language like PHP to process it. You didn't mention if you are familiar with it (php) or ASP. Also, are you using a CMS or your website is made from scratch?

Link to comment
Share on other sites

oh yeah, sorry, haha.to be honest i really dont know much about PHP, i am fairly new to this.im using 'livesite', so i started with a template, so it was more a matter of editing everything, iv checked their site but they dont answer many questions iv posted.im not even sure where to access my php files.

Link to comment
Share on other sites

In that case making a functional searching script would require a lot of work from you. You got dynamic content in your website right? If you do there should be php files and a database. Could you provide a link to the website?

Link to comment
Share on other sites

i viewed the search that my page came with in filezilla, it was the most confusing thing iv ever seen, i assume i can get a php viewer so it opens in a readable/editable file?i do have dynamic section, it lets me put php into it but do i need to enter code to style it, i put code in there and created a dynamic region, but when i entered it to a page style it didnt show, but i only had the php and no other code.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...