Hi, firstly this is my first post so thanks in advance for any help.
I have a form set up in flash pointing to a PHP script on my webspace.
I checked the PHP script and when viewed in a browser it returns the parameters OK so I presume it is working.
My problem is the variables captured by user input are not being sent to me.
Please can anyone check my actionscript below for errors.
Thanks in advance.
stop();
var fullName:TextField;
var fullAddress:TextField;
var postcode:TextField;
var telNumber:TextField;
var emailAddress:TextField;
var myData:LoadVars = new LoadVars();
fullName.restrict = "A-Za-zÁáÉéêíÍãõç ";
fullName.maxChars = 40;
fullAddress.restrict = "0-9A-Za-zÁáÉéêíÍãõç!?.+\- ";
fullAddress.maxChars = 90;
postcode.restrict = "0-9A-Za-zÁáÉéêíÍãõç!?.+\- ";
postcode.maxChars = 10;
telNumber.restrict = "0-9A-Za-zÁáÉéêíÍãõç!?.+\- ";
telNumber.maxChars = 20;
emailAddress.restrict = "0-9A-Za-zÁáÉéêíÍãõç!?.+\- ";
emailAddress.maxChars = 50;
function sendEmail(fullName, fullAddress, postcode, telNumber, emailAddress)
{
myData.fullName = fullName.text;
myData.fullAddress = fullAddress.text;
myData.postcode = postcode.text;
myData.telNumber = telNumber.text;
myData.emailAddress = emailAddress.text;
}
this.submitButton.onRelease = function()
{
if (fullName.text == "" || fullAddress.text == "" || postcode.text == "" || telNumber.text == "")
{
gotoAndStop("error");
}
else
{
this._parent.sendEmail();
gotoAndStop("correct");
}
this._parent.myData.send("http://www.mywebsite.co.uk/iopost.php", "POST");
};