Ver Mensaje Individual
  #4 (permalink)  
Antiguo 28/03/2003, 09:59
Avatar de ferent
ferent
 
Fecha de Ingreso: junio-2002
Ubicación: Madrid
Mensajes: 633
Antigüedad: 21 años, 10 meses
Puntos: 0
Te indico como lo hoce yo una vez y me funcionó:

este es el srcipt del flash
Código PHP:
stop ();
btn "enviar";
_focusrect=false;
// resetea campos por si tiró error y los dejaron en blanco.
if (name == "") {
    
name "nombre:";
}
;
if (
email == "") {
    
email "email:";
}
;
if (
comments == "") {
    
comments "comentarios";
}
;
// -----------------------------------------------funcion checkmail
function checkform () {
    
output "";
    
error "";
    
enviado false;
    
// check mail
    
largo email.length;
    if (
largo<4) {
        
error += "- <b>ESCRIBA UNA DIRECCION VALIDA</b>\n";
    } else {
        
count 0;
        for (
i=0i<largo+1i++) {
            if (
email.substr(i1) == "@" || email.substr(i1) == ".") {
                
count++;
            }
        }
        if (
count<2) {
            
error += "- <b>ESCRIBA UNA DIRECCION VALIDA</b>\n";
        }
    }
    
// fin del check mail
    // nombre
    
if (name == "nombre:" || name == "") {
        
error += "- <b>RELLENE EL CAMPO NOMBRE</b>\n";
    }
    
// comments
    
if (comments == "comentarios" || comments == "") {
        
error += "- <b>RELLENE EL CAMPO COMENTARIOS</b>\n";
    }
    
    if (
error != "") {
        
endmsg "PULSE EL BOTÓN <b>REGRESAR</b> PARA CORREJIRLOS\n GRACIAS </p>";
        
output "<p align=\"center\"><b>LO SENTIMOS</b>\n HEMOS ENCONTRADO ERRORES:\n"+error+endmsg;
        
gotoAndStop ("formerror");
    } else {
        
sendmail true;
        if(!
enviado){
            
            
loadVariables ("foro.php""""GET");
            
output "\n\n<p align=\"center\"><b>GRACIAS</b>\n\n\n LA INFORMACION FUE ENVIADA<p>\n
SERA PUBLICADA EN EL MENOR TIEMPO POSIBLE\n<p align=\"right\"><b>djmarta.com</b></p>"
;
            
gotoAndStop ("formok");
            
enviado=true;
        }else{
            
output "\n<p align=\"center\"><b>ERROR DE ENVIO</b>\n\n LA INFORMACION YA FUE ENVIADA\n\n
 INTENTELO MAS TARDE</p>"
;
            
gotoAndStop ("formok");
        }
    }

__________________
Culto es aquel que sabe donde encontrar lo que no sabe.