Re: sending hidden values AND option values at the same time ?

Discussion in 'HTML' started by Jukka K. Korpela, Sep 12, 2006.

  1. Frederick Smith <> scripsit:

    > Is there some way that I can get the drop down to send different
    > hidden values for the amount of the transaction AND the size.


    No. Not in HTML, and you don't want to get different data depending on
    whether client-side scripting is enabled or not, do you?

    > but I dont even know of its possible to join
    > the parameters together, let alone what sort of operator or syntax to
    > use.


    You seem to think that HTML might be some kind of a programming language.
    Well, it isn't.

    > If its just impossible, I will resort to perl scripting


    "Resort to"? _Any_ reliable processing of form data _requires_ some
    server-side code (though not necessarily in Perl, of course), so it's the
    Real Thing to be done. You simply get the user input as defined by the form
    markup and actual user actions, and then you can process it any way you need
    to.

    It would be grossly unsafe to include product prices into the HTML markup
    and rely on their correctness. Even a child could create a copy of your
    form, edit it, and submit an order with the price set to 0.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Sep 12, 2006
    #1
    1. Advertising

  2. Jukka K. Korpela wrote:
    > Frederick Smith <> scripsit:
    >
    >> Is there some way that I can get the drop down to send different
    >> hidden values for the amount of the transaction AND the size.

    >
    > No. Not in HTML, and you don't want to get different data depending on
    > whether client-side scripting is enabled or not, do you?
    >
    >> but I dont even know of its possible to join
    >> the parameters together, let alone what sort of operator or syntax to
    >> use.

    >
    > You seem to think that HTML might be some kind of a programming
    > language. Well, it isn't.
    >
    >> If its just impossible, I will resort to perl scripting

    >
    > "Resort to"? _Any_ reliable processing of form data _requires_ some
    > server-side code (though not necessarily in Perl, of course), so it's
    > the Real Thing to be done. You simply get the user input as defined by
    > the form markup and actual user actions, and then you can process it any
    > way you need to.
    >
    > It would be grossly unsafe to include product prices into the HTML
    > markup and rely on their correctness. Even a child could create a copy
    > of your form, edit it, and submit an order with the price set to 0.
    >


    So to simplify a little of what Jukka wrote, you need to build an order
    form that collects your product's part/stock numbers, quantities,
    customer info then set that to *your* server-side script
    (Perl|Php|Python|ASP|Whatever) that will

    1) Verify the user input as valid
    2) Look up prices and stuff (out of reach of customers)
    3) Build and format data for PayPal
    4) Transmit to PayPal

    Your HTML form should not go directly to PayPal.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Sep 12, 2006
    #2
    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. Krick
    Replies:
    1
    Views:
    1,463
    John C. Bollinger
    Aug 15, 2003
  2. Julien ROUZIERES

    g++ -pg option and -shared option

    Julien ROUZIERES, Dec 21, 2004, in forum: C++
    Replies:
    1
    Views:
    721
    GianGuz
    Dec 21, 2004
  3. flamesrock
    Replies:
    8
    Views:
    470
    Hendrik van Rooyen
    Nov 24, 2006
  4. Rick
    Replies:
    3
    Views:
    8,193
    Alexey Smirnov
    Apr 13, 2010
  5. SolarCanine
    Replies:
    2
    Views:
    288
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page