On Tue, Jul 8, 2008 at 12:07 PM, Mayer, Jonathan <[EMAIL PROTECTED]> wrote:
> -----Original Message-----
> From: Robert Cummings [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2008 17:01
> To: Eric Butera
> Cc: Mayer, Jonathan; Bastien Koert; Philip Thompson; PHP-General List
> Subject: Re: [PHP] Keeping POST values when paging
>
>
> On Tue, 2008-07-08 at 11:57 -0400, Eric Butera wrote:
>> On Tue, Jul 8, 2008 at 11:33 AM, Robert Cummings <[EMAIL PROTECTED]>
> wrote:
>> >
>> > Just a comment... the submit button/session technique sucks with respect
>> > to passing along links to people. I would suggest scrapping that
>> > approach and going with a GET approach (where the navigational
>> > information is present in the URL). I know my clients almost always want
>> > to be able to paste a URL into an email and have the recipient go
>> > directly to whatever they are viewing. Maybe that's not an issue for you
>> > though... yet ;)
>>
>> That isn't practical if your form has 50 fields though.
>
>>I haven't been following the thread very closely... does he have 50
>>fields?
>>
>>Cheers,
>>Rob.
>
>
> I do have a large form - not quite 50 fields but it would create very long
> URLs!
>
> I take your point, however. In this situation the GET method isn't needed,
> as there will be a very limited number of users who will generally use the
> system independantly of each other, but I understand your reasoning.
>
> So, I've been lucky this time, but it's something I need to consider more
> carefully in the design stage of future projects. PHP programming is a small
> part of my job, with only "hobby" experience to work with, so it's only now
> that I'm moving on to slightly larger projects I'm beginning to see the real
> benefits in the design stage. With this project, I carefully worked out all
> the database design before coding, but didn't do enough on the use-case side
> of things, such as considering the need for paging to ensure system speed
> during a database query with lots of results. So I get to the situation
> where I have 1,000 lines of reasonably decent code, and I'm trying to hack
> in a solution for, say, paging, when it could have been easily handled if it
> was considered more carefully earlier.
>
> Live and learn I guess!
>

I didn't think you had 50, but I got the impression it was quite a bit
more than a simple input box.

Rob is absolutely right though.  I built a system that allowed a user
to "drill down" across 5 levels of criteria.  On each level I stored
the parent's information in sessions so that I could skip all of the
query string and loading of records each time.  Well after all was
said and done the clients soon realized that they couldn't copy and
paste any url's in the system.  It was easy for me in the beginning
cutting down on a ton of code, but didn't work whatsoever for the
client since they really needed to share that information.  So I had
to re-code quite a bit of stuff.  Now whenever I build something I try
to keep it as stateless as possible.  I go out of my way to make sure
that url's stay short too because when they become too long sometimes
the copy and paste thing messes up with email clients text wrapping.

In the end though just try and focus on what the needs are.  If you're
building a user data entry form for a very specific purpose they
probably aren't going to need to share that with others.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to