Re: Making forget

Discussion in 'Perl Misc' started by ccc31807, Jul 11, 2012.

  1. ccc31807

    ccc31807 Guest

    On Jun 19, 11:51 am, Bernie Cosell <> wrote:
    > One aspect of that I've never liked is that it tries to 'remember'
    > form variables from one page to the next --- and worse makes it hard to
    > change a value, preferring to ignore your attempts to change the value and
    > keep the old one unless you go to some bother.  I *hate* this behavior and,
    > basically, always want to build my forms exactly as I want them [and,
    > indeed, generally prefer sessions to provide continuity from one form to
    > the next rather than larding up each form].

    My first reaction to your code was to wonder why you didn't explicitly
    set the value of the variables you use to generate your form elements.

    Different strokes for different folks. I write CGI scripts pretty
    often, and usually force my form variables to initialize to some
    value, even if it's only "" (blank value). I do a lot of displaying
    values from a database, and the mental template I use expects the
    widget to have some value. This way, I never have to think about the
    sticky/nonsticky behavior, i.e., I make sure that the value of each
    variable I use in the HTML is set to what I want it to be set to
    before I sent it to the client.

    I have a pronounced distaste for client side validation, and never use
    it. It's more work to validate the query parameters client side
    perhaps, but I can control the values and that makes me happy.

    I also have a pronounced distaste for cookies, and do all my session
    validation server side. This is more work, but it allows me to track
    the details of what a user does in each session. I typically stuff all
    my query parameters in a database, and query the database with each
    HTTP request.

    My philosophy is to strictly control what the client sees, and to
    distrust everything I receive from the client. I haven't had any
    problems in a long time, at least that I know about.

    ccc31807, Jul 11, 2012
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Emil Kvarnhammar

    Re: Make text boxes "forget" values

    Emil Kvarnhammar, Jul 16, 2003, in forum: ASP .Net
    Emil Kvarnhammar
    Jul 16, 2003
  2. Ames Andreas (MPA/DF)
    Ames Andreas (MPA/DF)
    Aug 5, 2004
  3. Wolf Behrenhoff

    Re: Making forget

    Wolf Behrenhoff, Jun 19, 2012, in forum: Perl Misc
    Wolf Behrenhoff
    Jun 19, 2012
  4. Xho Jingleheimerschmidt

    Re: Making forget

    Xho Jingleheimerschmidt, Jun 20, 2012, in forum: Perl Misc
    Xho Jingleheimerschmidt
    Jun 20, 2012
  5. J. Strübig

    Re: Making forget

    J. Strübig, Jun 20, 2012, in forum: Perl Misc
    J. Strübig
    Jun 20, 2012

Share This Page