I have a page where a user enters a search term, this then forwards to another page and runs a query based on this cookies contents. I was just wondering if it is good practice to do it this way? I know I can use a method="post (or get)" but I need the information to be consistent across several pages and queries.
closed as off topic by Glenn Rogers, Jeff Vanzella, palacsint, svick, Brian Reichle Nov 7 '12 at 20:57
Questions on Code Review Stack Exchange are expected to relate to code review request within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
Using a cookie sounds like the simplest way to achieve this, providing that users will have cookies enabled (and you'll also need to ask them, or at least inform, that you're using cookies).
Otherwise, if you wanted to keep a history of search queries, you could store them in a database (since you tagged