Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/07/2007, 13:48
Avatar de adexedl
adexedl
 
Fecha de Ingreso: julio-2005
Mensajes: 326
Antigüedad: 18 años, 9 meses
Puntos: 2
Formulario que no envia datos

Hola amigos, tengo un formulario en flash con el siguiente codigo:

stop();
// --------------------------------------------------------------
// función que valida números
// --------------------------------------------------------------
String.prototype.isNumbers = function() {
if (this.length<1) {
return false;
}
for (i=0; i<this.length; i++) {
code = this.charCodeAt(i);
if (this.charAt(i) != " " && code<48 || code>57) {
return false;
}
}
return true;
};
// --------------------------------------------------------------
// valida mails
// --------------------------------------------------------------
String.prototype.isMail = function() {
if (this.indexOf("@")>0 && this.indexOf("@") == this.lastIndexOf("@")) {
if (this.lastIndexOf(".")>this.indexOf("@")+1 && this.lastIndexOf(".")<this.length-2) {
return true;
}
}
};
// --------------------------------------------------------------
// función que limpia los campos
// --------------------------------------------------------------
function limpiar() {
nom = "";
telefono = "";
mailFrom = "";
body = "";
mensaje_error =""
}
// --
nombre.tabIndex = 1;
tel.tabIndex = 2;
mail.tabIndex = 3;
msg.tabIndex = 4;
// --
nombre.borderColor = 0xE7EFF7;
tel.borderColor = 0xE7EFF7;
mail.borderColor = 0xE7EFF7;
msg.borderColor = 0xE7EFF7;
//
nombre.onSetFocus = function() {
mensaje_error = "";
nombre.backgroundColor = 0xE7EFF7;
nombre.borderColor = 0x4A869C;
};
nombre.onKillFocus = function() {
nombre.backgroundColor = 0xFFFFFF;
nombre.borderColor = 0xE7EFF7;
};
// --
tel.onSetFocus = function() {
mensaje_error = "";
tel.backgroundColor = 0xE7EFF7;
tel.borderColor = 0x4A869C;
};
tel.onKillFocus = function() {
tel.backgroundColor = 0xFFFFFF;
tel.borderColor = 0xE7EFF7;
};
//
mail.onSetFocus = function() {
mensaje_error = "";
mail.backgroundColor = 0xE7EFF7;
mail.borderColor = 0x4A869C;
};
mail.onKillFocus = function() {
mail.backgroundColor = 0xFFFFFF;
mail.borderColor = 0xE7EFF7;
};
//
msg.onSetFocus = function() {
mensaje_error = "";
msg.backgroundColor = 0xE7EFF7;
msg.borderColor = 0x4A869C;
};
msg.onKillFocus = function() {
msg.backgroundColor = 0xFFFFFF;
msg.borderColor = 0xE7EFF7;
};
//
bEnviar.onRollOver = bLimpiar.onRollOver=function () {
this.gotoAndPlay("sobre");
};
bEnviar.onRelease = function() {
if (nom.length<1) {
mensaje_error = "Por favor introduzca su nombre";
} else if (telefono.length<1 or telefono.isnumbers() == false) {
mensaje_error = "Por favor, introduzca un teléfono de contacto";
} else if (!mail.text.isMail()) {
mensaje_error = "Por favor, introduzca e-mail válido";
} else {
loadVariablesNum("form.php", 0, "POST");
mensaje_error = "Mensaje enviado";
}
};
// --
bLimpiar.onRelease = function() {
limpiar();
};


y un archivo form.php con los siguientes datos:

<?
$to = "[email protected]";
$subject = "Consulta";
$msg = "$nom, le envía el siguiente mensaje:\n\n";
$msg .= "Teléfono: $telefono\n";
$msg .= "E-mail: $mailfrom\n";
$msg .= "Comments: $body\n";
mail($to, $subject, $msg, "From: $mailfrom");

?>


el problema es que me envia las variables, pero los datos introducidos en el formulario me los deja en blanco.

Saludos de antemano