I have a search box on a web page that I want to store the last 20
search entries and randomly display 5 of those search entries when the
page is loaded - as a way to give users search topic tips. I can not
figure out how to store and then display the search entries.
My idea is to put the search entry in the database by a
remote_function call when the user submits the search. In my view I
will loop through the column and randomly pull 5 search entries to
display. My model will control the number of entries.
How should I store the search entries? I have read about serialize,
but am not understanding how to insert and pull values from. Any ideas
on storing the entries? If serialize is the right way how do I use it?
Thanks in advance, K