Ver Mensaje Individual
  #13 (permalink)  
Antiguo 23/02/2012, 05:14
nobo
 
Fecha de Ingreso: diciembre-2011
Mensajes: 151
Antigüedad: 12 años, 3 meses
Puntos: 1
Respuesta: formulario de registro no hace nada

no no no !!! Si lo veo bien tu codigo. Solo que queria saber que le pasaba al mio para aprender. Averiguar donde estaba el error para no cometerlo.

Usando este codigo:
Código PHP:
Ver original
  1. if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] == 'http://localhost/zulo/alta_usuario.php' && ($_POST != null))
  2. {
  3.     $error = false; //Indica si hay un error
  4.     $pass = $_POST["strPassword"];
  5.     $password = $_POST["password"];
  6.     $email = $_POST["strEmail"];
  7.     $mail = $_POST["mail"];
  8.     $telefono = $_POST["intNtelf"];
  9.     $telefono2 = $_POST["telefono"];
  10.  
  11.       if($pass!=$password)
  12.       {
  13.          echo "Las contraseñas no coinciden";
  14.          $error = true;
  15.       }
  16.       if($email!=$mail)
  17.       {
  18.          echo "El email no coincide";
  19.          $error = true;
  20.       }
  21.      
  22.       if($telefono!=$telefono2)
  23.       {
  24.          echo "Los telefonos no coinciden";
  25.          $error = true;
  26.       }
  27.      
  28.       $checkuser = comprobaruser($_POST["strNick"]);
  29.       if ($checkuser !=0)
  30.       {
  31.         echo "El usuario ya existe";
  32.         $error = true;
  33.       }
  34.      
  35.       $checkmail = comprobarmail($_POST["strEmail"]);
  36.       if ($checkmail !=0)
  37.       {
  38.         echo "El mail" .$email. "ya existe";    
  39.         $error = true;
  40.       }
  41.  
  42.      if (isset($_POST["form1"]) && (!error))
  43.      {
  44.         $insertSQL = sprintf("INSERT INTO tblusuario (strNombre, strEmail, intActivo, strPassword, strDireccion, strNick, intCpostal, strProvincia, strPoblacion, intNtelf) VALUES (%s, %s, %s, %s, %s)",
  45.                        GetSQLValueString($_POST['strNombre'], "text"),
  46.                        GetSQLValueString($_POST['strEmail'], "text"),
  47.                        GetSQLValueString($_POST['intActivo'], "int"),
  48.                        GetSQLValueString($_POST['strPassword'], "text"),
  49.                        GetSQLValueString($_POST['strDireccion'], "text"),
  50.                        GetSQLValueString($_POST['strNick'], "text"),
  51.                        GetSQLValueString($_POST['intCpostal'], "int"),
  52.                        GetSQLValueString($_POST['strProvincia'], "text"),
  53.                        GetSQLValueString($_POST['strPoblacion'], "text"),
  54.                        GetSQLValueString($_POST['intNtelf'], "int"));
  55.         mysql_select_db($database_conexionzulo, $conexionzulo);
  56.        
  57.     }
  58.      
  59. }

No me hace el echo del mail...