Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Supporting Technologies > Server-Side Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-04-2008, 04:06 PM   #11
adamcasey
Registered User
 
Join Date: Sep 2007
Posts: 27
Default Form code now not working??

I've just updated the form on my site and now the .php won't submit the data? I've not touched the .php file????
the form is after page 28 of my flash book here:http://www.tees.me.uk/booknew


All I've done is change the form by adding a 'retry' button if the users are faced with the failed to send screen.
I've added the following actionscript:

//sends the user back to the front screen of the form
//if they have recieved the failed error message.

this.retryBU.onRelease = function(){
gotoAndStop("start");
}


What is the best way to trap this error?
I thought Firebug might have pointed something out to me but it hasn't.


Original php:
<?PHP
$to = "[email protected]";
$subject = "Online Flip Book Demo Request";
$message = "Name: " . $nameInput;
$message .= "\nEmail: " . $emailInput;
$message .= "\nCompany: " . $companyInput;
$message .= "\nTelephone: " . $contacttelInput;
$message .= "\nLocation: " . $countyCOMBO;
$headers = "From: $emailInput" . "\r\n";
$headers .= "Reply-To: $emailInput" . "\r\n";
$headers .= 'Bcc:[email protected]' . "\r\n";
$sentOk = mail($to,$subject,$message,$headers);
echo "sentOk=" . $sentOk;
?>


Original Actionscript
stop();

var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();


sendBU.onRelease = function() {
senderLoad.nameInput = nameInput.text;
senderLoad.emailInput = emailInput.text;
senderLoad.companyInput = companyInput.text;
senderLoad.contacttelInput = contacttelInput.text;
senderLoad.countyCOMBO = countyCOMBO.value;
senderLoad.sendAndLoad("http://www.tees.me.uk/Booknew/send.php",receiveLoad);
}

receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.demoForm.gotoAndStop("success");
}
else {
_root.demoForm.gotoAndStop("failed");
}
}
// Adds conditional logic for the Submit button that
// validates user input.
this.send_BU.onRelease = function(){
if (emailInput.text == null || emailInput.text ==""){
gotoAndStop("failed");
} else {
gotoAndStop("success");
}
}

Last edited by adamcasey; 04-04-2008 at 04:13 PM.
adamcasey is offline   Reply With Quote
Old 04-04-2008, 04:21 PM   #12
adamcasey
Registered User
 
Join Date: Sep 2007
Posts: 27
Default

Ignore me this was a spelling error in the path to the .php file.
adamcasey is offline   Reply With Quote
Old 04-07-2008, 11:32 AM   #13
jsebrech
Joeri Sebrechts
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 1,465
Default

Be mindful of email injection. Sadly PHP's mail function remains a spammer favorite because if you don't take the right precautions it is trivially easy for them to abuse mail scripts to send spam (even if the to: and cc: is hardcoded in the script).

http://www.securephpwiki.com/index.php/Email_Injection
jsebrech is offline   Reply With Quote
Old 04-08-2008, 01:11 PM   #14
adamcasey
Registered User
 
Join Date: Sep 2007
Posts: 27
Default

Thanks I will check that out
adamcasey is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple php problem (but I don't know php) natronp Server-Side Scripting 10 06-03-2005 06:30 AM
PHP Flash Email Survey WebIntuition ActionScript 2.0 0 05-22-2005 02:45 AM
PHP email form doesn't work even straight from a tutorial primablinki Server-Side Scripting 16 03-25-2005 03:13 AM
simple php ecard question rabsterb Server-Side Scripting 1 06-12-2003 08:56 AM
Question - email + php fspaiva ActionScript 1.0 (and below) 3 04-07-2003 04:39 PM


All times are GMT. The time now is 10:03 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.