Jump to content

How to: make an advanced search template with smarty.


klaasvaak

Recommended Posts

Hey all,

 

For my site www.baanict.com I would like to make an advanced search page. I've made a HTML version of the search options I would like to include. But I don't got a clue how to connect the form fields through smarty code with my MySQL database.

 

In the forum I can't find a post that's helpfull for me.

 

My site uses the open source project Jobberbase and many of us would like to see this option working for them.

 

My question exactly is what kind of function should I attach to for example to search a keyword in only the topic of a listing?

 

I hope somebody can help me with this issue or give me a suggestion to a helpfull tutorial.

 

Thanks in advance for your time

Smarty is especially made to make the life of web designers easier, I wouldn't recommend it for searching.

 

It's best to do the search server side. Where do you have the data stored? Assuming you have the data on a database, it's just a matter of passing the search paramaters to create a SELECT query. If you have the information elsewhere, for example, inside some specific directory, you can use the function fopen('path/to/file.txt').

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.