PDA

View Full Version : 'subscribe to mailing list' form in flash


terrender
10-03-2004, 05:44 PM
Hello,

i would like to make a 'subscribe to mailing list' form in flash. When a visitor enters personal stuff like name and e-mail in flash i would like to get an e-mail notification about the subscription automatically. Does anybody know how to do it? I have absolutely no experience in php and similar stuff.

thanks in advance
terrender

Cota
10-05-2004, 01:59 AM
Find yourself a PHP mailer script, use LoadVars from flash to send the data to the PHP script and let it handle the rest. Its fairly simple. Personally, I'm an ASP guy, but most people here prefer PHP. You'll find a lot of PHP stuff by doing a search here.

terrender
10-12-2004, 06:46 AM
thanks,
but i don't have PHP yet. And it costs me extra money, so i try to solve it differently.
I have a CGI-script i got from my server. It is a form. My question, can i use this kind of script for passing variables from flash to the script which automatically will generate en e-mail message? And how would the flash-actionscript code look like?
thanks in advance
Terrender



FORM ACTION="http://www.mydomain.nl/cgi-bin/formmail.cgi" METHOD="POST"
ENCTYPE="application/x-www-form-urlencoded">
<INPUT NAME="recipient" TYPE="HIDDEN" VALUE="[email protected]">
<INPUT NAME="subject" TYPE="HIDDEN" VALUE="subscribe to mailing list">
<INPUT NAME="redirect" TYPE="HIDDEN" VALUE="http://www.username.mydomain.nl/nextpage.html">
Naam:<BR><INPUT TYPE="text" NAME="realname" SIZE="30"><BR>
e-mail address:<BR><INPUT TYPE="text" NAME="email" SIZE="30"><BR>
message:<BR><TEXTAREA COLS=30 NAME="message" ROWS=5></TEXTAREA> <BR>
<INPUT TYPE="submit" VALUE="Submit">
<INPUT TYPE="reset" VALUE="Reset">
</FORM>

Cota
10-13-2004, 03:25 AM
The actionscript would look something like this:

var Varsend = new LoadVars();
Varsend.thing1 = thing1;
Varsend.thing2 = thing2;
Varsend.onLoad = function(success) {
if(success) {
trace("Successful");
}
};
Varsend.sendAndLoad("formmail.cgi", Varsend, "POST");

terrender
10-13-2004, 06:53 AM
thanks for the actionscript.
But does anybody know what i have to change in the formmail.cgi to make it able to receive the variables from flash?

thanks
terrender

Cota
10-14-2004, 03:15 AM
Show me the code in the cgi script and I'll tell you what you have to change.

terrender
10-14-2004, 05:59 AM
it's standing above. But here you get it again.


FORM ACTION="http://www.mydomain.nl/cgi-bin/formmail.cgi" METHOD="POST"
ENCTYPE="application/x-www-form-urlencoded">
<INPUT NAME="recipient" TYPE="HIDDEN" VALUE="[email protected]">
<INPUT NAME="subject" TYPE="HIDDEN" VALUE="subscribe to mailing list">
<INPUT NAME="redirect" TYPE="HIDDEN" VALUE="http://www.username.mydomain.nl/nextpage.html">
Naam:<BR><INPUT TYPE="text" NAME="realname" SIZE="30"><BR>
e-mail address:<BR><INPUT TYPE="text" NAME="email" SIZE="30"><BR>
message:<BR><TEXTAREA COLS=30 NAME="message" ROWS=5></TEXTAREA> <BR>
<INPUT TYPE="submit" VALUE="Submit">
<INPUT TYPE="reset" VALUE="Reset">
</FORM>

thanks
Terrender

Cota
10-14-2004, 06:03 AM
I was refering to the code in formmail.cgi