Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/03/2014, 11:51
davidprogramacion
 
Fecha de Ingreso: febrero-2014
Mensajes: 31
Antigüedad: 10 años, 3 meses
Puntos: 0
Ajustes => Email

EN LOS AJUSTES EN EMAIL, HAY UN PROBLEMA QUE NOSE PORQUE LES DEJO EL CODIGO:

EL PROBLEMA ES QUE AL CAMBIAR EMAIL SALE : ¡Los datos son incorrectos!
CUANDO LOS DATOS SON BUENOS, Y NO SE CAMBIA, NOSE PORQUE, NECESITO AYUDA.

Código PHP:
if(isset($_POST['save'])){
    
$pass1 FilterText($_POST['password']);
    
$pass1_hash HoloHashMD5($pass1$myrow['username']);
    
$day1 FilterText($_POST['day']);
    
$month1 FilterText($_POST['month']);
    
$year1 FilterText($_POST['year']);
        
$formatted_dob "".$day1.".".$month1.".".$year1."";
    
$mail1 FilterText($_POST['email']);
    
$themail $mail1;
        
//checks password --encryption--
        
if($pass1_hash == $myrow['password'] && $formatted_dob == $myrow['birth']){
        
$email_check preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i"$mail1);
            if(
$email_check == "1"){
            
mysql_query("UPDATE users SET mail = '".$mail1."' WHERE username = '".$rawname."' and password = '".$rawpass."'");

            
$result "Tu email se ha cambiado con éxito a \"".$mail1."\".";
            } else {
            
$result "Dirección de correo electrónico incorrecto.";
            
$error "1";
            }
        } else {
        
$result "¡Los datos son incorrectos!";
        
$error "1";
        }
    } else {
    
$themail $myrow['mail'];
    }