RE: [PHP] Perplexing Problem

From: Date: Wed, 06 Sep 2000 19:45:38 +0000
Subject: RE: [PHP] Perplexing Problem
Groups: php.general 
Request: Send a blank email to php-general+get-15563@lists.php.net to get a copy of this message
You can make the links work like a form button with javascript (onClick="submit..."). Or they could be form buttons; in this case each button could have something like NAME=direction and VALUE="back" / VALUE="forward". On the receiving end use a switch or if/else statement to determine what to do. With the checkboxes you could collect all the values in an array and simply echo them as hidden variables with a loop statement each time you generate a new page. Just some quick thoughts. Hope that helps a bit. med vänlig hälsning /Dana -----Original Message----- From: james.atkinson@ebox.ca [SMTP:james.atkinson@ebox.ca] Sent: Wednesday, September 06, 2000 7:18 PM To: php-general@lists.php.net Subject: [PHP] Perplexing Problem Greetings List, I've been charged with an interesting task here at work and I need some suggestions on how I would go about acomplishing what I have to do. I'm building a form that searchs a database for a listing of memebers. That by itself is easy. The search results must be listed on a page with no more then 10 results per page up to 100 results. That is also easy. This much I have accomplished. However, in each set of 10 the user can select any number of the search results. The problem I"m having is how to retain the data from 1 page of results to the next. Here's an example User does a search. Gets 30 results, thus has 3 pages of data. The user selects 2 results from the first page, then goes to the second pages and selects 2 results. He then wants to go back and select another from the first page. How do I keep track of what the user has selected? The tool for selection is a simple checkbox, the 'Next Page'/'Previouse Page' are just links (<a href = etc etc). Is there a way I can make the links work like a form submit button? I'm really stuck here, I'm hoping someone can help me out... Thanks :) -- James Atkinson ----------------------------------------------------------------- James Atkinson 100world Technical Developer 512-1529 West 6th Avenue phone: +1-604-637-8122 Vancouver, BC, V6J 1R1 fax: +1-604-742-1770 Canada email: james.atkinson@100world.com http://www.100world.com

« previous php.general (#15563) next »