# Form

**URL:** <https://forum.kirupa.com/t/form/175975>\
**Category:** Uncategorized\
**Created:** [January 19, 2006, 10:38am UTC](https://forum.kirupa.com/t/form/175975 "2006-01-19T10:38:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pipoootje](https://avatars.discourse-cdn.com/v4/letter/p/c67d28/32.png) [@pipoootje](https://forum.kirupa.com/u/pipoootje)\
**Post date:** [January 19, 2006, 10:38am UTC](https://forum.kirupa.com/t/form/175975/1 "2006-01-19T10:38:30Z")

</div>

I made a form in flash to send a mail to an emailaddress, when I export the .fla to .swf, then it works correctly. But when I insert that .swf in a .html-document and run this in a browser, it won’t work! What could be the reason?☹

Flash MX Pro 2004:  
var senderLoad:LoadVars = new LoadVars();  
var receiveLoad:LoadVars = new LoadVars();

verzenden.onRelease = function() {  
senderLoad.bedrijf = bedrijf.text;  
senderLoad.emailadres = emailadres.text;  
senderLoad.info = info.text;  
senderLoad.vraag = vraag.text;  
senderLoad.sendAndLoad(“[http://www.solvo.tv/westinform/verzenden2.php](http://www.solvo.tv/westinform/verzenden2.php)”,receiveLoad);  
}

receiveLoad.onLoad = function() {  
if (this.sentOK) {  
sentOK = “”;  
bedrijf.text = “”;  
emailadres.text = “”;  
info.text = “”;  
vraag.text = “”;  
}  
}

For PHP I used the following:  
\<?php  
$subject = “Mail via website”;  
$bedrijf = "Bedrijf / Organisatie: " . $bedrijf;  
$info = "Info: " . $info;  
$vraag = "Vraag: " . $vraag;  
$message = “Contactformulier homepage  
$bedrijf  
$info  
$vraag”;  
$sentOK = mail (“nico.van.hessche@westinform.be”, “$subject”, “$message”, “From:$emailadres”);

echo “sentOK=” . $sentOK;

?\>
