Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with directory needed

Status
Not open for further replies.

mmaz

Programmer
Nov 22, 2000
347
Hi,

We have a directory of companies and we want to make it searchable and sortable. At the top of the page, there's A B C ...Z, and when the user clicks on one of the letters, I want to get the companies whose name starts with the submitted letter.

The problem is, there are also other controls on my search form, and they're submitted through the POST method, while the letters are in <a href>, passed with the GET method.

Does anybody have suggestions as to how I could achieve searching results with form controls AND alphabetical search?

Thanks,

Marie
 
...also, I know I could do this with javascript, but I don't want to, due to lack of support from some browsers.
 
that's not that difficult.. there's a couple of ways to do it.. you can either do it w/ links as you currently are, and either link to the same php page (php_self) or you can call another php script to do the actual search and include the orriginating php page to provide the links again at the top and or bottom.

Or, you can use drop down boxes to select the letter which will automatically perform *the above

Basicly all you really need to do is isolate the first letter, then &quot;select company_name from companies
where company_name like 'keyword%'&quot;

The above is by no means complete.. it's just intended to give you a general idea

Hope this helped

KC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top