Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/08/2008, 19:11
ggermes
 
Fecha de Ingreso: julio-2003
Mensajes: 52
Antigüedad: 20 años, 9 meses
Puntos: 0
Mensaje Respuesta: Validacion de mail con php ¿que hice mal?

la puse pero ahora me devuelve el mail en la variable envez de true or false
¿alguna idea?

Código:
$email = $_REQUEST['email'];
$notas = $_REQUEST['notas'];
$repemail = $_REQUEST['repemail'];
$repmatricula = $_REQUEST['repmatricula'];
//*************************************************
//Funcion Verficar formato del correo post insert
//*************************************************
  function isEmail($email){
            return (bool)preg_match('/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/',$email);
        }  
$mailc="isEmail($email)";
echo "$mailc";
//*************************************************
//*************************************************
//validacion de data post insert
//*************************************************
if($_REQUEST['
Cita:
Iniciado por emiliodeg Ver Mensaje
hacela mas facil con una expresion regular

yo uso esta

Código PHP:
 function isEmail($email){
            return (bool)
preg_match('/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/',$email);
        }