Search +Paginate results

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Jim_Bo
Forum Contributor
Posts: 390
Joined: Sat Oct 02, 2004 3:04 pm

Post by Jim_Bo »

Hi,

Not saying your not clear :wink:

Im saying I have tried a few means of getting it to work .. with no luck .. So I am unclear in what to do exactly ..


Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I would imagine sending it in the url as 'search' would be a good way.. since you already have 'page' used for the page number to go to. When you check for $_POST['search'] if that is empty, look for $_GET['search'] then.. if that is empty then display all results.. I'd suggest using rawurlencode() on the variable when adding it to the url, just in case there's stuff that shouldn't be unescaped in it.. :)
Post Reply