Hola!
Hice un formulario en flash y php pero no me funciona...necesito encontrar el error pero busco y busco y no lo veo!!!
Me podrian ayudar a encontrar la falla??
MUCHISIMAS GRACIAS!!!!!
ESTE ES EL CODIGO QUE TIENE EL BOTON ENVIAR EN FLASH on (release) {
sender_nombre = nombre.text;
sender_apellido = apellido.text;
sender_legajo = legajo.text;
sender_texto = texto.text;
sender_destino = destino.text;
trace(nombre.text);
if (signa!= -1 && nombre.text != -1 && apellido.text != -1 && legajo.text != -1 && destino.text != "" && texto.text != "") {
nombre.text = "";
apellido.text = "";
legajo.text = "";
destino.text = "";
texto.text = "";
mc._visible = false;
loadVariables("http://www.lasjulitas.com.ar/sendmail.php", this, "POST");
this.onData = function() {
for (var a in this) {
trace([a, this[a]]);
}
this.nextFrame();
if (this.output == "sent") {
_root.errTitle = "Muchas Gracias.";
_root.errType = "Su mensage ha sido enviado.";
} else {
_root.errTitle = "Ocurrio un error!";
_root.errType = "Atención, un error a ocurrido al procesar su mensage. Por favor intentelo de nuevo más tarde.";
}
};
}
if (texto.text == "") {
mc.txt_error.txterror = "POR FAVOR INGRESE SU COMENTARIO";
mc.gotoAndPlay("hayerror");
}
if (destino.text == "") {
mc.txt_error.txterror = "POR FAVOR INGRESE DESTINO";
mc.gotoAndPlay("hayerror");
}
if (legajo.text == "") {
mc.txt_error.txterror = "POR FAVOR INGRESE SU LEGAJO";
mc.gotoAndPlay("hayerror");
}
if (apellido.text == "") {
mc.txt_error.txterror = "POR FAVOR INGRESE SU APELLIDO";
mc.gotoAndPlay("hayerror");
}
if (nombre.text == "") {
mc.txt_error.txterror = "POR FAVOR INGRESE SU NOMBRE";
mc.gotoAndPlay("hayerror");
}
} Y ESTE ES EL CODIGO DEL ARCHIVO PHP <?
if(!empty($HTTP_POST_VARS['sender_nombre']) || !empty($HTTP_POST_VARS['sender_apellido']) || !empty($HTTP_POST_VARS['sender_legajo']) || !empty($HTTP_POST_VARS['sender_destino']) || !empty($HTTP_POST_VARS['sender_texto']))
{
$fecha = date("D-M-y H:i");
$to = "[email protected]";
$subject = "Mail desde el formulario SUGERENCIAS";
$body = stripslashes($HTTP_POST_VARS['sender_texto']);
$body .= "\n\n---------------------------\n";
$body .= "Nombre: " . $HTTP_POST_VARS['sender_nombre'] . "\n";
$body .= "Apellido: " . $HTTP_POST_VARS['sender_apellido'] . "\n";
$body .= "Legajo: " . $HTTP_POST_VARS['sender_legajo'] . "\n";
$body .= "Destino: " . $HTTP_POST_VARS['sender_destino'] . "\n";
$body .= "Fecha del mensaje: ".$fecha;
$header = "From: " . $HTTP_POST_VARS['sender_nombre'] . " <" . $HTTP_POST_VARS['sender_apellido'] . ">\n";
$header .= "Reply-To: " . $HTTP_POST_VARS['sender_nombre'] . " <" . $HTTP_POST_VARS['sender_apellido'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(@mail($to, $subject, utf8_decode($body), $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>