Form Mail Question

Discussion in 'Perl' started by Neil Trigger, Dec 8, 2003.

  1. Neil Trigger

    Neil Trigger Guest

    I'm desperatrely trying to work out the perl syntax for taking a value from
    a form field and putting it in another web page for example:

    "Hello world my name is $my_name_field."

    I know that this is the wrong syntax but I'm damned if i can work out what
    it REALLY is.
    It's probably something really simple.

    Please let me know either by posting here (I DO check) or email:

    Thanks.

    --
    ¿ Trigger ?
    http://www.magic2k.com/
    http://www.oddmap.co.uk
     
    Neil Trigger, Dec 8, 2003
    #1
    1. Advertising

  2. Neil Trigger

    Nick Santos Guest

    "Neil Trigger" <> wrote in message
    news:5f1Bb.19337$...
    > I'm desperatrely trying to work out the perl syntax for taking a value

    from
    > a form field and putting it in another web page for example:
    >
    > "Hello world my name is $my_name_field."
    >
    > I know that this is the wrong syntax but I'm damned if i can work out what
    > it REALLY is.
    > It's probably something really simple.
    >
    > Please let me know either by posting here (I DO check) or email:
    >
    > Thanks.
    >
    > --
    > ¿ Trigger ?
    > http://www.magic2k.com/
    > http://www.oddmap.co.uk
    >
    >

    Could you possibly include more code on what you are trying to do? Right now
    I'm fairly unclear. That current code would print out $my_name_field, but
    first you need to make sure you are actually processing your form so that
    $my_name_field has a value from the form. If that's what you need to do, I'd
    recommend cgi.pm (not sure if this is what you're still needing to do, but
    I'll briefly go over it). To get the information from the previous webpage,
    all you would need to do would be:

    use CGI;
    $query = new CGI;

    $my_name_field=$query->param('whatever_your_form_field_box_name_is_here')

    print "Content-Type: text/html\n\n"; #it is possible to print your headers
    with CGI.pm, but I won't go into that

    print "$my_name_field."

    #end

    CGI.pm gets much more complex than that, and can pretty much handle your
    webpages completely from generation to processing. I personally don't use it
    for everything, but the features are there. For more on CGI.pm goto
    http://stein.cshl.org/WWW/software/CGI/ where you will find massive amounts
    of documentation telling you what you want to know.
     
    Nick Santos, Dec 9, 2003
    #2
    1. Advertising

  3. Neil Trigger

    Neil Trigger Guest

    Neil Trigger, Dec 10, 2003
    #3
    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. Curt_C [MVP]
    Replies:
    5
    Views:
    376
    Karim
    May 19, 2004
  2. me
    Replies:
    0
    Views:
    462
  3. Tim
    Replies:
    12
    Views:
    1,298
    kchayka
    Jul 15, 2005
  4. nauticalmac

    Mail insertion hack on Send Mail form

    nauticalmac, Dec 23, 2005, in forum: ASP General
    Replies:
    0
    Views:
    286
    nauticalmac
    Dec 23, 2005
  5. Ferrous Cranus
    Replies:
    42
    Views:
    480
    Ferrous Cranus
    Sep 6, 2013
Loading...

Share This Page