Ver Mensaje Individual
  #10 (permalink)  
Antiguo 22/02/2012, 17:38
Fierox
 
Fecha de Ingreso: febrero-2012
Ubicación: En mi propio mundo
Mensajes: 73
Antigüedad: 14 años, 7 meses
Puntos: 23
Respuesta: formulario de registro no hace nada

Bueno solo te falta mirar bien cuando te devuelve != 0 las funciones comprobarmail() y comprobarUser(), es probable que ahí este el problema.

Si solucionas el problema ese, usando este código te debería salir todo bien
Código PHP:

if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] == 'http://localhost/zulo/alta_usuario.php' && ($_POST != null)) 
{
    
$error = false; //Indica si hay un error
    
$pass = $_POST["strPassword"];
    
$password = $_POST["password"];
    
$email = $_POST["strEmail"];
    
$mail = $_POST["mail"];
    
$telefono = $_POST["intNtelf"];
    
$telefono2 = $_POST["telefono"]; 
 
      if(
$pass!=$password) 
      {
         echo 
"Las contraseñas no coinciden"; 
         
$error = true;
      }
      if(
$email!=$mail) 
      {
         echo 
"El email no coincide"; 
         
$error = true;
      }
      
      if(
$telefono!=$telefono2) 
      {
         echo 
"Los telefonos no coinciden";
         
$error = true;
      }
      
      
$checkuser = comprobaruser($_POST["strNick"]);
      if (
$checkuser !=0) 
      {
        echo 
"El usuario ya existe";
        
$error = true;
      }
      
      
$checkmail = comprobarmail($_POST["strEmail"]);
      if (
$checkmail !=0)
      {
        echo 
"El mail" .$email. "ya existe";     
        
$error = true;
      }

     if (isset(
$_POST["form1"]) && (!error)) 
     {
        
$insertSQL = sprintf("INSERT INTO tblusuario (strNombre, strEmail, intActivo, strPassword, strDireccion, strNick, intCpostal, strProvincia, strPoblacion, intNtelf) VALUES (%s, %s, %s, %s, %s)",
                       
GetSQLValueString($_POST['strNombre'], "text"),
                       
GetSQLValueString($_POST['strEmail'], "text"),
                       
GetSQLValueString($_POST['intActivo'], "int"),
                       
GetSQLValueString($_POST['strPassword'], "text"),
                       
GetSQLValueString($_POST['strDireccion'], "text"),
                       
GetSQLValueString($_POST['strNick'], "text"),
                       
GetSQLValueString($_POST['intCpostal'], "int"),
                       
GetSQLValueString($_POST['strProvincia'], "text"),
                       
GetSQLValueString($_POST['strPoblacion'], "text"),
                       
GetSQLValueString($_POST['intNtelf'], "int"));
        
mysql_select_db($database_conexionzulo, $conexionzulo);
        
    }
     
}