PDA

View Full Version : Search Engine


DarcMagik
03-26-2004, 01:01 AM
Hello I am working on a project that includes a search engine in it where the user chooses some values from some form fields and then on the next page it pulls the items out of the database and displays them. Now I am trying to set it up so that after so many records it will stop displaying and then display a back button and a next button. and what I want it to do is if they hit the back button it goes back but if they hit the next button I want it to refresh the current page and display the next set of data. Any help would be appreciated.

kryptech.net
03-26-2004, 11:32 AM
SELECT * FROM table DESC LIMIT 100 or something like that

DarcMagik
03-26-2004, 01:17 PM
Not quite what I'm looking for what I was looking for. I've got the sql command figured out. The part that I'm looking for help with is the displaying part. I'm trying to have it display 4 entries from the database on the screen. Then the programs stops it from displaying then displays a back button to go back to the search page and a forward button to go to the next set of results. Now I can figure out the code for the forward button that works just fine. But the back button the only code I was able to figure out was an onClick=history.go(-1) but the only problem with that is that if they hit the back button the counter variable is still incremented like the next button was clicked because I cant figure out a clause to distinguish between the back button and the next button. In other words how do i set it up so that if they click the back button it retains the original value of the counter in the session and if they hit the Next button how do I make it increment the session value and go to the next page.