The best way to go about this is to keep a URL variable as you're going through the pages. So anywhere you create the link to go to the next page or back, include a variable of the search term. So something like this:
search.php?query=ninjas
Then, all you have to do to retrieve it is:
$_GET['query']
So for your code, it'd be something like this:
[php]
echo "";
[/php]
Also, when passing variables around through the URL, always consinder SQL Injections. Click here for more info: http://www.daniweb.com/techtalkforums/thread199.html
samaru
a.k.a inscissor
1,256 posts since Feb 2002
Reputation Points: 262
Solved Threads: 18