Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/05/2008, 20:03
jaz78
 
Fecha de Ingreso: marzo-2008
Mensajes: 43
Antigüedad: 16 años, 1 mes
Puntos: 0
Ayuda con formulario y php

hola tengo echo un formulario en flash y lo eh puesto en un clip dentro de una pagina pero no funciona ya que si esta todo bien me tendira que llevar al fotograma 3 donde dice mensaje enviado y no lo hace, alguien puede revisarme el codigo? gracias.-

PHP:

<?
$nombre=$_POST['nombre'];
$email=$_POST['email'];
$direccion=$_POST['direccion'];
$telefono=$_POST['telefono'];
$provincia=$_POST['provincia'];
$edad=$_POST['edad'];
$sexo=$_POST['sexo'];
$comentario=$_POST['comentario'];
$acepto=$_POST['acepto'];
$asunto="este mensaje debe llegar desde el usuario";
$destino="[email protected]";
$mensaje="nombre:$nombre\n email:$email\n direccion:$direccion\n telefono:$telefono\n provincia:$provincia\n sexo:$sexo\n edad:$edad\n comentario:$comentario\n";
mail($destino, $asunto, $mensaje, "from:$nombre<$email>")
echo '&estatus=ok&';
?>


FLASH:
recepcion.onLoad=function (exito:Boolean){
if(recepcion.estatus=="ok"){
gotoAndStop(3);
}
}
function vacio(texto){
if(texto==""){
return true;
}
else{
for(i=0;i<texto.length;i++){
if(texto.charAT(i)==""){
return true;
}
}

return false;
}
}

function esEmail(texto){
if (vacio(texto)){
return false;
}
var arreglo1:Array = texto.split("@");
if(arreglo1.length!=2){
return false;
}
else {
var arreglo2: Array = arreglo1[1].split(".");
if (arreglo2.length<2){
return false;
}
else{
return true;
}
}
}
function enviar(){
var envio:LoadVars=new LoadVars();
var recepcion:LoadVars=new LoadVars();
envio.nombre=nombre.text;
envio.email=email.text;
envio.telefono=telefono.text;
envio.direccion=direccion.text;
envio.comentario=comentario.text;
envio.edad=edad.value;
envio.sexo=sexo.selectedData;
envio.provincia=provincia.value;
envio.acepto=acepto.selected;
if(vacio(envio.nombre)){
mx.controls.Alert.show("Ingrese su Nombre","Error",Alert.OK);
}
else if (!esEmail(envio.email)){
mx.controls.Alert.show("Ingrese un Email correcto","Error",Alert.OK);
}
else if (envio.acepto==false){
mx.controls.Alert.show("Debe aceptar para enviar","Error",Alert.OK);
}
else{
envio.sendAndLoad("recepcion.php",recepcion,"Post" );
gotoAndStop(2);
}
}