sepehr
11-15-2006, 01:41 PM
on (release) {
data.email = email;
data.name = name;
data.message = message;
data.recip = recip;
data.exist = exist;
data.loadVariables('sendmail.php', 'POST');
_parent.status = 'sending now ...';
}
i have this code that is for flash 5 and i have to sxport my movie using flash player 8 so it creates error when exporting i wonder if somebody can convert this flash5 code to flash8 pro
ps:do i have to update sendmail.php codes? i don't know much about php
ignore lines starting with // (comments)
<?php
// list all vars to be expected from the movie
$vars = array("name", "email", "message", "recip", "exist");
// and import them into the script
foreach($vars as $var)
if(isset($_POST[$var]))
$$var = $_POST[$var];
else
$$var = '';
// check variables
//if(strlen($name) < 3)
// die("&status=please enter a real name&");
//if(!eregi('^([a-z0-9\._-])+@([^\.]+\.[^\.]+)', $email, $matched))
// die("&status=please enter a correct email address&");
//else if(!getmxrr($matched[2], $mxrr))
// die("&status=your mail server does not seem to exist&");
// where to send it
// remove or configure one of the two code blocks
// otherwise your mail will be sent to johnnybegood@hotmail.com :)
//**** this one for the selectable recipients ****
//$recips = array("support" => "support@somesite.com", "account" => "billing@somesite.com");
//$recip = $recips[$recip];
// if something went wrong, send to default address
//if(empty($recip)) $recip = "support@somesite.com";
// ***** end selectable recipient ********
// ***** or one fixed recipient ******
$recip = "sepehr.online@gmail.com";
//**** end fixed recipient *******
// build up message
// this code for any multiline text fields
$message = str_replace("\r", "\n", $message);
// info vars
$sender = $_SERVER[REMOTE_ADDR];
// you can rearrange this - just do not add or remove quotes
$mailbody = "Contact form sent by
Name: $name
Email: $email
//Existing customer? $exist
message:
$message
-------
sender's ip: $sender";
// send it off
// note - if you omit the last part, a few servers do not send mail at all,
// but most would show strange senders like nobody@server17.hostingcompany.com
mail($recip, "contact form", $mailbody, "From: webserver@yoursite.com");
// and tell visitor
print "&status=mail sent - we will be in touch with you shortly&";
?>
data.email = email;
data.name = name;
data.message = message;
data.recip = recip;
data.exist = exist;
data.loadVariables('sendmail.php', 'POST');
_parent.status = 'sending now ...';
}
i have this code that is for flash 5 and i have to sxport my movie using flash player 8 so it creates error when exporting i wonder if somebody can convert this flash5 code to flash8 pro
ps:do i have to update sendmail.php codes? i don't know much about php
ignore lines starting with // (comments)
<?php
// list all vars to be expected from the movie
$vars = array("name", "email", "message", "recip", "exist");
// and import them into the script
foreach($vars as $var)
if(isset($_POST[$var]))
$$var = $_POST[$var];
else
$$var = '';
// check variables
//if(strlen($name) < 3)
// die("&status=please enter a real name&");
//if(!eregi('^([a-z0-9\._-])+@([^\.]+\.[^\.]+)', $email, $matched))
// die("&status=please enter a correct email address&");
//else if(!getmxrr($matched[2], $mxrr))
// die("&status=your mail server does not seem to exist&");
// where to send it
// remove or configure one of the two code blocks
// otherwise your mail will be sent to johnnybegood@hotmail.com :)
//**** this one for the selectable recipients ****
//$recips = array("support" => "support@somesite.com", "account" => "billing@somesite.com");
//$recip = $recips[$recip];
// if something went wrong, send to default address
//if(empty($recip)) $recip = "support@somesite.com";
// ***** end selectable recipient ********
// ***** or one fixed recipient ******
$recip = "sepehr.online@gmail.com";
//**** end fixed recipient *******
// build up message
// this code for any multiline text fields
$message = str_replace("\r", "\n", $message);
// info vars
$sender = $_SERVER[REMOTE_ADDR];
// you can rearrange this - just do not add or remove quotes
$mailbody = "Contact form sent by
Name: $name
Email: $email
//Existing customer? $exist
message:
$message
-------
sender's ip: $sender";
// send it off
// note - if you omit the last part, a few servers do not send mail at all,
// but most would show strange senders like nobody@server17.hostingcompany.com
mail($recip, "contact form", $mailbody, "From: webserver@yoursite.com");
// and tell visitor
print "&status=mail sent - we will be in touch with you shortly&";
?>