Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: passing CGI form parameters via HTML email

by gmacfadden (Sexton)
on Jun 22, 2006 at 00:38 UTC ( [id://556799]=note: print w/replies, xml ) Need Help??


in reply to Re: passing CGI form parameters via HTML email
in thread passing CGI form parameters via HTML email

Sorry, I did not realize anything in all caps was unwelcome form. Please forgive me. I shall respond to your questions in order.

When I invoke CGI script 1 via server side HTML, I get the desired and expected output: e.g.
$subject is: {input from HTML form}
$comments is: {other input from HTML form}
......in other words, everything works fine.

When I invoke CGI script 1 via responding to the HTML email which is created by CGI script 2, and thence sent to my AOL client side email account, I get: e.g.

$subject is: {all blank}
$comments is: {all blank}
.......see, I'm expecting the same output results, as the inputs provided for subject and comments are the same (instead I get blanks)

I got the idea to try this after my car was serviced and the service provider sent an email to my AOL email account that contains a satisfaction survey embedded in the body of the AOL email message. Since the service provider's survey worked, I'm inclined to believe the problem is with my code, not the security features on my email client. I hope this gives you a better feel for the problem. If anything still isn't clear, I'm happy to provide more information. Thank you for your patience.

Replies are listed 'Best First'.
Re^3: passing CGI form parameters via HTML email
by mbadolato (Hermit) on Jun 22, 2006 at 02:39 UTC
    Well, I just tried this out. I sent the email from my work server, and picked it up at home, via Thunderbird.

    The URL pointed to your script, which I copied to a local machine here.

    I used the subject "Test" and the comment "Foo"

    when I clicked the submit button in the email I got:

    $subject is Test $content is

    The URL was correct: http://192.168.1.102/test/view_sent_form_data.cgi?subject=Test&content=Foo

    Further analysis shows that the form variable in your scripts is set to a different name than what you're trying to print. IE, you do this in your script that generates the email:

    Comments: <textarea name="content" rows="2" cols="15"></textarea>

    and this in your script that prints:

    my $comments = param("comments");

    So, I think you have a combination of things. 1) Your CGI parameter is wrong, and 2) AOL may not be letting you submit properly (or may be munging your HTML as was suggested above)

      After correcting the CGI parm, everything worked properly on a different email client (AOL email not being very friendly). Thanks for the great help.
Re^3: passing CGI form parameters via HTML email
by samtregar (Abbot) on Jun 22, 2006 at 02:19 UTC
    Try sending it to a few different email clients. AOL is probably the most aggressive HTML mangler around, so it's quite likely you'll find that your form works elsewhere. If that turns out to be the case, take a close look at the form as it appears in AOL via "View Source". Also, you might take a close look at the form that did work - perhaps it does things in a way you can copy.

    -sam

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://556799]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2024-03-28 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found