PDA

View Full Version : mail form in flash (MailForm.pl)



doobd
03-11-2004, 06:37 PM
i've created mailing form in flash. i'm not using 'flash components', but i've created input text fields in wich page visitor should write his personal data that should be mailed to me, after pressing send button.

site is located on server that supports perl scripting, and in my provider's FAQ i've found the following HTML code for creating a mailing form:

----------------------------------------------------------------------------------------------------
<form action="http://www.inet.hr/cgi-bin/FormMail.pl" method="post">
<input type=hidden name="recipient" value="email@domena.hr">

Naslov poruke
<input type=text name="subject">

Vaš e-mail
<input type=text name="email">

Vaše ime
<input type=text name="realname">


Tekst poruke
<textarea name="Poruka" cols=60 rows=8></textarea>


<input type="submit" value="Posalji!">
<input type="reset" value="Obrisi!">
</form>
----------------------------------------------------------------------------------------------------

i've tried posting this code in html document, and it works, but i can't get my mailing form in flash working. i tried with this actionscript code:

----------------------------------------------------------------------------------------------------
recipient="mymail@inet.hr"
subject="test"
Poruka="jdslkjglkjdsagljk"
loadVariablesNum("http://www.inet.hr/cgi-bin/FormMail.pl",0,"POST");
----------------------------------------------------------------------------------------------------

but it doesn't send anything. can somebody tell me where am i mistakeing? pay attention to variable name 'Poruka' instead of standard 'body' in HTML sample code, i think that script FormMail.pl is partialy translated to my language (croatian). anyway, HTML code works, and i need to adjust it to actionscript use.

tnx.

voodooboy
03-22-2004, 11:06 AM
The way I understand it, you cannot send email forms directly from Flash, you need an intervening script like asp or php to process the information. Here is a tutorial I found that might help you.

http://www.kirupa.com/developer/actionscript/flash_php_email.htm

The only other form tutorials I find use components, which you say you are not using.

Best of luck. I hope this helps.