Form routing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim Tome

    Form routing

    Hello, I'm not much of a Perl programmer (I usually just adapt a canned
    formmail script!), but I have a situation where I need to route
    information from an HTML contact form to different people (via having
    the form results e-mailed via the aforementioned formmail) depending on
    which checkbox in a form is selected.

    Just to make it a little more difficult, the form needs to process to
    more than one person if more than one checkbox is selected (e.g. if
    box1 then mailto person1, if box1 and box2 then mailto person1 and
    person2).

    I tried setting up a function in Javascript that would check which
    boxes are checked and then write the hidden field that defines the
    recipients. Of course, this didn't work.

    Any help?

    Either post here or e-mail me directly.

    Thanks!

  • Michael Winter

    #2
    Re: Form routing

    On Wed, 05 May 2004 17:09:38 GMT, Jim Tome <jtome@demicoop er.com> wrote:
    [color=blue]
    > Hello, I'm not much of a Perl programmer (I usually just adapt a canned
    > formmail script!), but I have a situation where I need to route
    > information from an HTML contact form to different people (via having
    > the form results e-mailed via the aforementioned formmail) depending on
    > which checkbox in a form is selected.
    >
    > Just to make it a little more difficult, the form needs to process to
    > more than one person if more than one checkbox is selected (e.g. if box1
    > then mailto person1, if box1 and box2 then mailto person1 and person2).
    >
    > I tried setting up a function in Javascript that would check which boxes
    > are checked and then write the hidden field that defines the recipients.
    > Of course, this didn't work.[/color]

    If you want to avoid any possibility of allowing spam to be sent through
    your pages, you'll have to do this on the server. What you're proposing
    above is sending the e-mail address to the script which is a major
    security hole. Instead, the mail script should have a list of possible
    recipients and the checkboxes select from that list. This avoids exposing
    the addresses of the recipients and prevents specifying arbitrary
    recipients.

    How this is achieved is obviously off-topic in this group.
    [color=blue]
    > Either post here or e-mail me directly.[/color]

    Read the FAQ, particularly section 2.3, para. 7.

    <URL:http://jibbering.com/faq/>

    Mike

    --
    Michael Winter
    M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

    Comment

    Working...