im trying to send variables from flash to php in the background without reloading
here is my code
on(release) {
if(_root.main.right.news_sign.newsletter.text.indexOf("@") != -1 && _root.main.right.news_sign.newsletter.text.indexOf(".") != -1) {
_root.main.right.news_sign.check_text.text = "";
varsToSend = new LoadVars();
varsToSend.newsletter=_root.main.right.news_sign.newsletter.text;
varsToSend.sendAndLoad("email.php",this.varsToSend);
gotoAndPlay(2);
}else {
_root.main.right.news_sign.check_text.text = "Please Enter Valid Email";
}
}
but it works standalone… doesnt work in browswer… anyone know why?
here is my php code
<?
$ToEmail = "info@me.com";
$ToSubject = "Newsletter signup";
$EmailBody = "Sent By; $newsletter";
$success = mail($ToEmail,$ToSubject, $EmailBody, "From:".$newsletter." <".$newsletter.">");
if($success) {
echo sucesss;
}
?>
oh yea! it shouldnt pop up a window and tahts why im usng sendAndLoad and not send
please help