Ver Mensaje Individual
  #7 (permalink)  
Antiguo 22/02/2012, 15:53
nobo
 
Fecha de Ingreso: diciembre-2011
Mensajes: 151
Antigüedad: 12 años, 4 meses
Puntos: 1
Respuesta: formulario de registro no hace nada

Asi?
Algo no me cuadra, mira cuantos }}}} Hay al final del codigo... :S

Sigue sin hacer nada...

Esto funciona:
if($pass!=$password) {
echo "Las contraseñas no coinciden"; }
if($email!=$mail) {
echo "El email no coincide"; }

if($telefono!=$telefono2) {
echo "Los telefonos no coinciden";
}else {
$checkuser = comprobaruser($_POST["strNick"]);
if ($checkuser !=0) {
echo "El usuario ".$nick. " ya existe"; }
$checkmail = comprobarmail($_POST["strEmail"]);
if ($checkmail !=0){
echo "El mail " .$email. " ya existe"; }
Pero lo siguiente no... El else que deberia insertar los datos no funciona...

Código PHP:
Ver original
  1. if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] == 'http://localhost/zulo/alta_usuario.php' && ($_POST != null)) {
  2.    
  3. $pass = $_POST["strPassword"];
  4. $password = $_POST["password"];
  5. $email = $_POST["strEmail"];
  6. $mail = $_POST["mail"];
  7. $telefono = $_POST["intNtelf"];
  8. $telefono2 = $_POST["telefono"];
  9.  
  10.       if($pass!=$password) {
  11.          echo "Las contraseñas no coinciden"; }
  12.             if($email!=$mail) {
  13.          echo "El email no coincide"; }
  14.      
  15.          if($telefono!=$telefono2) {
  16.          echo "Los telefonos no coinciden";
  17.       }else {
  18.           $checkuser = comprobaruser($_POST["strNick"]);
  19.          if ($checkuser !=0) {
  20.              echo "El usuario ya existe"; }
  21.              $checkmail = comprobarmail($_POST["strEmail"]);
  22.              if ($checkmail !=0){
  23.                  echo "El mail" .$email. "ya existe"; }
  24.                  else {
  25.  
  26. if (isset($_POST["form1"])) {
  27.   $insertSQL = sprintf("INSERT INTO tblusuario (strNombre, strEmail, intActivo, strPassword, strDireccion, strNick, intCpostal, strProvincia, strPoblacion, intNtelf) VALUES (%s, %s, %s, %s, %s)",
  28.                        GetSQLValueString($_POST['strNombre'], "text"),
  29.                        GetSQLValueString($_POST['strEmail'], "text"),
  30.                        GetSQLValueString($_POST['intActivo'], "int"),
  31.                        GetSQLValueString($_POST['strPassword'], "text"),
  32.                        GetSQLValueString($_POST['strDireccion'], "text"),
  33.                        GetSQLValueString($_POST['strNick'], "text"),
  34.                        GetSQLValueString($_POST['intCpostal'], "int"),
  35.                        GetSQLValueString($_POST['strProvincia'], "text"),
  36.                        GetSQLValueString($_POST['strPoblacion'], "text"),
  37.                        GetSQLValueString($_POST['intNtelf'], "int"));
  38.  
  39.   mysql_select_db($database_conexionzulo, $conexionzulo);}}}}

Última edición por nobo; 22/02/2012 a las 16:30