Hi!!! I’m new in this forum…
I’m doing a form in flash thas has some input text areas thas pass variables to a php and then send it by mail … up to here is everithing Ok, but now I have to introduce some check boxes, but I don’t now how to pass the information to the PHP and then to the mail… I have read lots of tutorials, but nothing works!!! ;(
I put the form at this link for you to see it (it’s really simple!)
http://www.yda.cl/prueba/formulario3.html
In the “send” button in flash I have this code:
on (release) {
if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
EmailStatus = “Por favor ingrese un email válido”;
} else if (!FirstName.length) {
EmailStatus = “Por favor ingrese su nombre”;
} else if (!ToComments.length) {
EmailStatus = “Por favor ingrese su mensaje”;
} else {
loadVariablesNum(“enviaok.php”, “0”, “POST”);
EmailStatus = “Su mensaje ha sido enviado exitosamente”;
}
}
And in the PHP this one:
<?php
// Envía mail
$myemp = $HTTP_POST_VARS[‘Emp’];
$myrut = $HTTP_POST_VARS[‘rut’];
$myname = $HTTP_POST_VARS[‘FirstName’];
$myemail = $HTTP_POST_VARS[‘Email’];
$myfono = $HTTP_POST_VARS[‘Tel’];
$contactname = “Desde Sitio Web”;
$contactemail = "msotolivares@gmail.com";
$message = $HTTP_POST_VARS[‘ToComments’];
$subject = “Cotización desde el Sitio Web”;
$headers = “From: “.$myname.” <”.$myemail.">";
if (getenv(HTTP_CLIENT_IP))
{ $ip = getenv(HTTP_CLIENT_IP); }
else
{ if (getenv(HTTP_X_FORWARDED_FOR))
{ $ip = getenv(HTTP_X_FORWARDED_FOR); }
else
{ $ip = getenv(REMOTE_ADDR); }
}
$nomhost=gethostbyaddr($ip);
$hoyfh = date(“Y-m-d H:i:s”);
$mensaje = “El mensaje fue enviado desde el Host: “.$nomhost.” (”.$ip.")"." el " .$hoyfh."
Nombre del contacto: “.$myname.”
Empresa: “.$myemp.”
Email: “.$myemail.”
Teléfono: “.$myfono.”
Cotización: ".$message;
mail($contactemail, $subject, $mensaje, $headers);?>
I also put the files in the attachment, I hope someone could help me I’m really complicated!!! ;(
Bye