grazie mille And80,
ho riadattato il tuo codice action script tenendo solo un loadVars... ma il problema è sempre lo stesso
non capisco se il problema che mi capita di ricevere email vuote dipenda dal codice php o as..
cmq hai ragione il codice php che ho inserito scritto da me, è striminzito e allora ne ho pescato uno molto interessante che ho riadattato ma a quanto pare non sono riuscito a farlo funzionare.... addirittura non mi manda la mail...
ora lo posto:
Codice PHP:
<?
if(!empty($_POST['theEmail'])
|| !empty($_POST['theMessage'])
|| !empty($_POST['sender_subject'])
|| !empty($_POST['theName']))
{
$to = "miaemail@libero.it";
$s_name = $_POST['theName'];
$s_mail = $_POST['theEmail'];
$subject = stripslashes($_POST['sender_subject']);
$body = stripslashes($_POST['theMessage']);
$body .= "\n\n---------------------------\n";
$body .= "Mail sent by: $s_name <$s_mail>\n";
$header = "From: $s_name <$s_mail>\n";
$header .= "Reply-To: $s_name <$s_mail>\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(@mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>
riposto anche quello action script che ho riadattato secondo tuoi consigli
codice:
//funzione convalida form
var senderLoad:LoadVars = new LoadVars();
function validateForm() {
errors.length = 0;
validateName();
validateEmail();
validateText();
if (errors.length > 0)
{
validateName();
validateEmail();
validateText();
}
else
{
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.theMessage = theMessage.text;
senderLoad.sendAndLoad("http://www.miosito.com/send.php", senderLoad, "POST");
senderLoad.onLoad = function(ok){
if(ok)
{
unReleasedForm();
logo.orb.onRelease = animationPimage;
_parent.form.theName.text = "";
_parent.form.theEmail.text = "";
_parent.form.theMessage.text = "";
}
}
animaConv();
}
}
form.submit_mc.onRelease = validateForm;
grazie infinite guru