RE: [PHP] PHP - Web/list Question...
At 4:08 PM -0800 11/9/08, bruce wrote: hi tedd... no offense... but how does this get me to where i was talking about going??? this is simply a demo of breaking a list up across multiple pages... thanks No offense taken. I read: I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. And I thought that you were asking for a way to do that. However, now seeing what you actually asked, I would use a database to record each item the user picked and then when displaying the pages again, would check the dB first to see if the item should be noted as checked or not. I would tie it all together with a session. If your user wants to check-out, then you have a record of all the items he selected during his visit and can show them on a single page. This of course would require the user to post/get each page UNLESS you use ajax and write to the dB via a slave php script. That's not all that difficult to do. In any event, those are the two ways I would consider. Cheers, tedd -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Sunday, November 09, 2008 4:02 PM To: bruce; php-general@lists.php.net Subject: Re: [PHP] PHP - Web/list Question... At 8:26 PM -0800 11/8/08, bruce wrote: Hi. I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Without reading any one else's reply, here's something you might consider. http://webbytedd.com/bbb/paging/index.php?page=1 Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
At 4:08 PM -0800 11/9/08, bruce wrote: hi tedd... no offense... but how does this get me to where i was talking about going??? this is simply a demo of breaking a list up across multiple pages... thanks No offense taken. I read: I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. And I thought that you were asking for a way to do that. However, now seeing what you actually asked, I would use a database to record each item the user picked and then when displaying the pages again, would check the dB first to see if the item should be noted as checked or not. I would tie it all together with a session. If your user wants to check-out, then you have a record of all the items he selected during his visit and can show them on a single page. This of course would require the user to post/get each page UNLESS you use ajax and write to the dB via a slave php script. That's not all that difficult to do. In any event, those are the two ways I would consider. Cheers, tedd -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Sunday, November 09, 2008 4:02 PM To: bruce; php-general@lists.php.net Subject: Re: [PHP] PHP - Web/list Question... At 8:26 PM -0800 11/8/08, bruce wrote: Hi. I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Without reading any one else's reply, here's something you might consider. http://webbytedd.com/bbb/paging/index.php?page=1 Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I want to suggest a solution that might get your life easier. Why don't you group those items and make then put each group in a page. Your user will choose the first group will post the data (say using a submit button labeled Next ) and then you can get him to the next group. You can keep the data in a db table and then when your user finishes choosing the items you can give him the option to change any of the categories you have. In that time you can allow him to edit and go back to the final step. If of course it is possible to group the items and make a logical division. -- Thodoris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP - Web/list Question...
hi T!! This might work! The items in my list are really scripts for given colleges, that have been created by developers. This phase is a part of the workflow for the script so the app can test the script, or run it in the production phase. The testing portion involves testing the script, looking at the results, and then either promoting the successful script to the production folder, or returning the script back to the dev folder. so, the testing portion is where i want to group the scripts. in reality, i should look to test files either: -individual script (just want to run a quick test for a college) -by a user (might have made a few mistakes, so i want to test all his/her scripts) -based on the date of completed dev (test all the scripts in the last 24hrs that are in dev) -any other possible groups??? this process could work, as i could then simply have some checkboxes that would interface with the mysql select to generate the list... i could then allow the user to delete if nessasary from the list.. on the production side, since i'm going to crawl all the colleges to update the data, i'd simply create/update a group that has all the colleges, which can be automated, with no need for manual interaction... this could work, and would eliminate the need for the pagination/session approach.. if you have any other thoughts regarding possible selects/issues for the testing/grouping process let me know your thoughts!! thanks guys.. -Original Message- From: Thodoris [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2008 5:53 AM To: tedd Cc: php-general@lists.php.net Subject: Re: [PHP] PHP - Web/list Question... At 4:08 PM -0800 11/9/08, bruce wrote: hi tedd... no offense... but how does this get me to where i was talking about going??? this is simply a demo of breaking a list up across multiple pages... thanks No offense taken. I read: I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. And I thought that you were asking for a way to do that. However, now seeing what you actually asked, I would use a database to record each item the user picked and then when displaying the pages again, would check the dB first to see if the item should be noted as checked or not. I would tie it all together with a session. If your user wants to check-out, then you have a record of all the items he selected during his visit and can show them on a single page. This of course would require the user to post/get each page UNLESS you use ajax and write to the dB via a slave php script. That's not all that difficult to do. In any event, those are the two ways I would consider. Cheers, tedd -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Sunday, November 09, 2008 4:02 PM To: bruce; php-general@lists.php.net Subject: Re: [PHP] PHP - Web/list Question... At 8:26 PM -0800 11/8/08, bruce wrote: Hi. I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Without reading any one else's reply, here's something you might consider. http://webbytedd.com/bbb/paging/index.php?page=1 Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I want to suggest a solution that might get your life easier. Why don't you group those items and make then put each group in a page. Your user will choose the first group will post the data (say using a submit button labeled Next ) and then you can get him to the next group. You can keep the data in a db table and then when your user finishes choosing the items you can give him the option to change any of the categories you have. In that time you can allow him to edit and go back to the final step. If of course it is possible to group the items and make a logical division. -- Thodoris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General
RE: [PHP] PHP - Web/list Question...
h if one uses sessions, or a db store, the underlying logic to get the input vars from the form on the individual pages (for the list) will essentially be the same. i'll have to have a form element, with the input items. i'll need to process the checkboxes for each item, and when the user selects the continue/submit btn, i'll perform the get/post action which then accumulates the items from the previous page... for each page, i'll have to process logic for the items listed in the form, to see if the user has changed his/her mind... (ie, when the user goes back to a previous page.) when the user submits the continue btn, it'll present a list of the selected items, allowing the user to revise the list, by going back to the original lists (via the back btn) items can be deleted, via a delete checkbox for each item in the list... checking a submit btn will then write the final data to the db storage... page 1,2,...: previous - next state cityhospital checkbox continue the continue page -provides the list of the user selected items state cityhospital checkbox revise - finish on the continue page, the the user can uncheck the checkbox, to remove an item, or the user can add additional items, by selecting the revise btn, which goes back to the initial pages/list.. thoughts/comments -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Sunday, November 09, 2008 10:49 AM To: Micah Gersten Cc: Stut; bruce; php-general@lists.php.net Subject: Re: [PHP] PHP - Web/list Question... On Sun, 2008-11-09 at 12:39 -0600, Micah Gersten wrote: Robert Cummings wrote: On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote: Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. -Stut Also, by storing the information server side, there is less of a chance of the user tampering with the data. Storing stuff in the session also saves on network bandwidth of sending and retrieving the data with each request. Nah, the problem is the same. Tamper with the GET data or tamper with the POST date before it goes into the session. Need to check the incoming data regardless. Cheers, Rob. Yes, but once it's in the session, it should be ok. True, but the same possibility of tampering existed with the POST data. Therefore the chance of tampering is the same. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
O/H Robert Cummings ??: On Sun, 2008-11-09 at 12:39 -0600, Micah Gersten wrote: Robert Cummings wrote: On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote: Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. -Stut Also, by storing the information server side, there is less of a chance of the user tampering with the data. Storing stuff in the session also saves on network bandwidth of sending and retrieving the data with each request. Nah, the problem is the same. Tamper with the GET data or tamper with the POST date before it goes into the session. Need to check the incoming data regardless. Cheers, Rob. Yes, but once it's in the session, it should be ok. True, but the same possibility of tampering existed with the POST data. Therefore the chance of tampering is the same. Cheers, Rob. Not true because if the data are stored in the cookie every time that the cookie is accessed the data are passing from the client to the server. This adds further network traffic and gives the client the chance to interfere with the cookie's data. So I think that the server side storage (sessions) is safer because you check once, then store and use as needed. On the other hand sessions give bigger load to the web server.So another solution could be to encrypt the cookie's data if that is the way that suits you better in order to make things more secure... Thodoris
Re: [PHP] PHP - Web/list Question...
On Sun, 2008-11-09 at 22:08 +0200, Thodoris wrote: O/H Robert Cummings έγραψε: On Sun, 2008-11-09 at 12:39 -0600, Micah Gersten wrote: Robert Cummings wrote: On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote: Also, by storing the information server side, there is less of a chance of the user tampering with the data. Storing stuff in the session also saves on network bandwidth of sending and retrieving the data with each request. Nah, the problem is the same. Tamper with the GET data or tamper with the POST date before it goes into the session. Need to check the incoming data regardless. Cheers, Rob. Yes, but once it's in the session, it should be ok. True, but the same possibility of tampering existed with the POST data. Therefore the chance of tampering is the same. Cheers, Rob. Not true because if the data are stored in the cookie every time that the cookie is accessed the data are passing from the client to the server. This adds further network traffic and gives the client the chance to interfere with the cookie's data. So I think that the server side storage (sessions) is safer because you check once, then store and use as needed. On the other hand sessions give bigger load to the web server.So another solution could be to encrypt the cookie's data if that is the way that suits you better in order to make things more secure... You have to check any newly checked posts anyways. So the security implications are the same. Loop over all received IDs and ensure integrity. With the GET system you just reloop over the previously submitted IDs. The result while not equivalent with respect to CPU time, is certainly equivalent with respect to checking security. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On Sun, 2008-11-09 at 20:16 +, Stut wrote: On 9 Nov 2008, at 18:37, Robert Cummings wrote: On Sun, 2008-11-09 at 18:22 +, Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. Depends on the situation really. I'd really not restrict myself in an environment where there is sufficient possibility for which X numbers whose cumulative digits could easily break the 1024 byte lower bound for GET requests. How many digits are these IDs? How man can be chosen? It's not unreasonable to select pages of some kind of item. It would only take 200 averaging 5 digits to break the limit. The solution here is simple in both respects, and using sessions really doesn't strike me as using a sledgehammer. I don't disagree, I was just pointing out that sessions as implemented by PHP are not the only answer to data storage between requests and in a lot of cases are overkill. It's a decision you have to base on the requirements and expected future developments of a project. I firmly believe the advice given on this list should provide choices rather than dictate methods. There's always more than one way to do something. I absolutely agree, I certainly don't think what you proposed is in any way wrong, but *my* preference for this particular problem would probably be to use the session. I avoid the session as much as possible since then you can't provide a link to someone via email to bring up the same context as you had, but in this case that seems an unlikely scenario, whereas the possibility of accumulating many items is quite likely given the items will be paged. Taking further context though on my stream of responses... you did say: Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? This suggests you thought my particular opinion to be ludicrous ;) As such, I felt inclined to more strongly defend my stance. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP - Web/list Question...
h if one uses sessions, or a db store, the underlying logic to get the input vars from the form on the individual pages (for the list) will essentially be the same. i'll have to have a form element, with the input items. i'll need to process the checkboxes for each item, and when the user selects the continue/submit btn, i'll perform the get/post action which then accumulates the items from the previous page... for each page, i'll have to process logic for the items listed in the form, to see if the user has changed his/her mind... (ie, when the user goes back to a previous page.) when the user submits the continue btn, it'll present a list of the selected items, allowing the user to revise the list, by going back to the original lists (via the back btn) items can be deleted, via a delete checkbox for each item in the list... checking a submit btn will then write the final data to the db storage... page 1,2,...: previous - next state cityhospital checkbox continue the continue page -provides the list of the user selected items state cityhospital checkbox revise - finish on the continue page, the the user can uncheck the checkbox, to remove an item, or the user can add additional items, by selecting the revise btn, which goes back to the initial pages/list.. thoughts/comments -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Sunday, November 09, 2008 10:49 AM To: Micah Gersten Cc: Stut; bruce; php-general@lists.php.net Subject: Re: [PHP] PHP - Web/list Question... On Sun, 2008-11-09 at 12:39 -0600, Micah Gersten wrote: Robert Cummings wrote: On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote: Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. -Stut Also, by storing the information server side, there is less of a chance of the user tampering with the data. Storing stuff in the session also saves on network bandwidth of sending and retrieving the data with each request. Nah, the problem is the same. Tamper with the GET data or tamper with the POST date before it goes into the session. Need to check the incoming data regardless. Cheers, Rob. Yes, but once it's in the session, it should be ok. True, but the same possibility of tampering existed with the POST data. Therefore the chance of tampering is the same. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. -Stut Server side storage is meant to be used. The session was one of the greatest things that PHP has given to the web programming world. It should not be feared. Also, why clutter up someone's machine with stuff held in a cookie? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. -Stut Also, by storing the information server side, there is less of a chance of the user tampering with the data. Storing stuff in the session also saves on network bandwidth of sending and retrieving the data with each request. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On Sun, 2008-11-09 at 18:22 +, Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. Depends on the situation really. I'd really not restrict myself in an environment where there is sufficient possibility for which X numbers whose cumulative digits could easily break the 1024 byte lower bound for GET requests. How many digits are these IDs? How man can be chosen? It's not unreasonable to select pages of some kind of item. It would only take 200 averaging 5 digits to break the limit. The solution here is simple in both respects, and using sessions really doesn't strike me as using a sledgehammer. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
At 8:26 PM -0800 11/8/08, bruce wrote: Hi. I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Without reading any one else's reply, here's something you might consider. http://webbytedd.com/bbb/paging/index.php?page=1 Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On 9 Nov 2008, at 18:05, Micah Gersten wrote: Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Server side storage is meant to be used. The session was one of the greatest things that PHP has given to the web programming world. It should not be feared. Also, why clutter up someone's machine with stuff held in a cookie? 1. PHP certainly did not give sessions to the web programming world. 2. Why clutter up your server architecture with sessions unless you're already using them reasonable purposes. What we're talking about here is a list of numbers, which I'm perhaps incorrectly assuming will be fairly short and extremely temporary? IMHO sessions are overused in all web development, not just PHP. In most cases they're a wrecking ball when a tiny hammer will do. But it's your choice, wreck away! -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On 9 Nov 2008, at 18:37, Robert Cummings wrote: On Sun, 2008-11-09 at 18:22 +, Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. Depends on the situation really. I'd really not restrict myself in an environment where there is sufficient possibility for which X numbers whose cumulative digits could easily break the 1024 byte lower bound for GET requests. How many digits are these IDs? How man can be chosen? It's not unreasonable to select pages of some kind of item. It would only take 200 averaging 5 digits to break the limit. The solution here is simple in both respects, and using sessions really doesn't strike me as using a sledgehammer. I don't disagree, I was just pointing out that sessions as implemented by PHP are not the only answer to data storage between requests and in a lot of cases are overkill. It's a decision you have to base on the requirements and expected future developments of a project. I firmly believe the advice given on this list should provide choices rather than dictate methods. There's always more than one way to do something. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On 9 Nov 2008, at 20:30, Robert Cummings wrote: On Sun, 2008-11-09 at 20:16 +, Stut wrote: On 9 Nov 2008, at 18:37, Robert Cummings wrote: On Sun, 2008-11-09 at 18:22 +, Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. Depends on the situation really. I'd really not restrict myself in an environment where there is sufficient possibility for which X numbers whose cumulative digits could easily break the 1024 byte lower bound for GET requests. How many digits are these IDs? How man can be chosen? It's not unreasonable to select pages of some kind of item. It would only take 200 averaging 5 digits to break the limit. The solution here is simple in both respects, and using sessions really doesn't strike me as using a sledgehammer. I don't disagree, I was just pointing out that sessions as implemented by PHP are not the only answer to data storage between requests and in a lot of cases are overkill. It's a decision you have to base on the requirements and expected future developments of a project. I firmly believe the advice given on this list should provide choices rather than dictate methods. There's always more than one way to do something. I absolutely agree, I certainly don't think what you proposed is in any way wrong, but *my* preference for this particular problem would probably be to use the session. I avoid the session as much as possible since then you can't provide a link to someone via email to bring up the same context as you had, but in this case that seems an unlikely scenario, whereas the possibility of accumulating many items is quite likely given the items will be paged. Agreed, but IMHO lack of URL-sharing is just one of many reasons to avoid sessions if possible. Taking further context though on my stream of responses... you did say: Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? This suggests you thought my particular opinion to be ludicrous ;) As such, I felt inclined to more strongly defend my stance. I should've explained the context of that reply. I was specifically referring to your assertion that sessions are easier to manage. They are slightly easier than most alternatives for the developer, but they can quickly become a nightmare for the sysadmin. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
Robert Cummings wrote: On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote: Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. -Stut Also, by storing the information server side, there is less of a chance of the user tampering with the data. Storing stuff in the session also saves on network bandwidth of sending and retrieving the data with each request. Nah, the problem is the same. Tamper with the GET data or tamper with the POST date before it goes into the session. Need to check the incoming data regardless. Cheers, Rob. Yes, but once it's in the session, it should be ok. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. You session purest! :-P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote: Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. -Stut Also, by storing the information server side, there is less of a chance of the user tampering with the data. Storing stuff in the session also saves on network bandwidth of sending and retrieving the data with each request. Nah, the problem is the same. Tamper with the GET data or tamper with the POST date before it goes into the session. Need to check the incoming data regardless. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On Sun, 2008-11-09 at 12:39 -0600, Micah Gersten wrote: Robert Cummings wrote: On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote: Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Unless they're likely to select hundreds of items I'd either go with a persisted GET var or a cookie. No need to drag server-side storage into this. Well he did say he had multiple pages. Maybe he's only displaying 5 per page though. Still, sessions are easier to manage than GET vars since you don't need to append them to every form action URL to accumulate them. Session is managed transparently by PHP in most cases an amounts to the approximate overhead of an include. Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? You really see that as a valuable developer time-saver? The mind boggles, but as I've said before and probably will again it's always a personal choice, I'm just suggesting alternatives. -Stut Also, by storing the information server side, there is less of a chance of the user tampering with the data. Storing stuff in the session also saves on network bandwidth of sending and retrieving the data with each request. Nah, the problem is the same. Tamper with the GET data or tamper with the POST date before it goes into the session. Need to check the incoming data regardless. Cheers, Rob. Yes, but once it's in the session, it should be ok. True, but the same possibility of tampering existed with the POST data. Therefore the chance of tampering is the same. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
Stut schreef: On 9 Nov 2008, at 20:30, Robert Cummings wrote: Agreed, but IMHO lack of URL-sharing is just one of many reasons to avoid sessions if possible. Taking further context though on my stream of responses... you did say: Seriously? You'd rather use sessions than explode, modify and implode an array of numbers on each request? This suggests you thought my particular opinion to be ludicrous ;) As such, I felt inclined to more strongly defend my stance. I should've explained the context of that reply. I was specifically referring to your assertion that sessions are easier to manage. They are slightly easier than most alternatives for the developer, but they can quickly become a nightmare for the sysadmin. I here by baptise you 'Stateless Stut' ;-) ... oh, I had a drinking session on friday ... it didn't make anything easier ... especially not driving. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
bruce [EMAIL PROTECTED] wrote: Hi. I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. You use a database, form on each page adds to a temp table on the database, when they have verified them all (if that is something they can do) OR have finished whatever form/survey you have them doing, then you write the temp table info to the one you want to keep. You could do some of that with ajax as well, but if you want to break up a 200 item list, you are looking at a database to store the info in the most efficient manner possible. You could also do it with sessions, but if they get stuck and need to come back, then if they had to login their session might be different and they'd have to start over again. HTH, Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Web/list Question...
On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: Hi. I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200 items, and i don't want to have the items listed on the same page as it would be too long. i can break the list up, so i can have it be displayed over multiple pages. however, i want the user to select different items from the list. given that the selected items might be over different pages, what's the best way of keeping a running track of the items that have been selected?? I could have each page be a form, and do a post/get where i then keep track of the selected items from page to page, but that would appear to get ugly. i'm looking for pointers to other sites/code that might have already implemented this kind of scenario. thoughts/pointers would be appreciated... Accumulate them in the session. When done, and before final action you could let them view a summary of selected items and allow deletion of any entries they don't want. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php