Forum Moderators: phranque

Message Too Old, No Replies

<form> field values don't pass when Submitted from a Mail message

Works great in a web browser, not from Apple Mail 1.3

         

MichaelBluejay

3:44 pm on Jan 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



<form action="http://example.com/quiz/vote.cgi" method=post>
<input type=hidden name="id" value="2006-01">
<input type=submit name="vote" value="Yes">
<input type=submit name="vote" value="No">
</form>

This code works fine on a web page, and in a message read with SquirrelMail (a webmail client). But when I read it with Apple mail 1.311 and click either "Yes" or "No" my Perl script returns no value for param(id) and param(vote).

If I use GET instead of POST then it works, but that makes the URL ugly.

Is there some hack that will get this to work?

MichaelBluejay

10:52 pm on Jan 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



(bump)

physics

11:01 pm on Jan 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My guess is that there is no hack ... if POST variables don't work in Apple mail then you have to use GET. Plus the url wouldn't look too ugly, just two parameters, right?

MichaelBluejay

1:58 am on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for the note. Yeah, but I don't like generating a one-time url that shouldn't be used again. In many browsers when you start typing the domain name the browser will fill in the entire url for a recent page that was visited, in this case a vote in a poll when the vote has already been made. Yeah, I can check to make sure that votes aren't recorded twice, but it's just a best-practices thing -- I try not to use a GET method for a URL that's not supposed to be used again.

But it looks like I don't have a good alternative if I want compatability with Apple Mail, so I guess I'm using GET...