SHARE
TWEET

Untitled

a guest Sep 22nd, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     include 'conexion.php';
  3.  
  4.     $ip = $_SERVER['REMOTE_ADDR'];
  5.     $user = $_GET['username'];
  6.     $pass = $_GET['password'];
  7.     $repass = $_GET['rpassword'];
  8.     $email = $_GET['email'];
  9.     $pre = $_GET['pregunta'];
  10.     $resp = $_GET['respuesta'];
  11.    
  12.    
  13.     $row = sqlsrv_query($conn_sis, "SELECT TOP 1 UserUID FROM  PS_UserData.dbo.Users_Master ORDER BY UserUID DESC");
  14.     $res = sqlsrv_query($conn_sis, "SELECT UserID FROM  PS_UserData.dbo.Users_Master WHERE (UserID) = ('$user')");
  15.  
  16.     $uid = sqlsrv_fetch_array($row);
  17.     $uidd = $uid[0] + 1;
  18.  
  19.     if (sqlsrv_num_rows($res)) {
  20.         echo "Esta cuenta ya existe.";
  21.     } else {
  22.         $query = "INSERT INTO PS_UserData.dbo.Users_Master (UserUID, UserID, Pw, JoinDate, Admin, AdminLevel, UseQueue, Status, Leave, LeaveDate, UserType, UserIp, Email, Pregunta, Respuesta, ModiIp, ModiDate, Point, Enpassword, Birth) VALUES ($uidd, '$user', '$pass', GETDATE(), 0, 0,'',0,'', DATEADD(year, +10, GETDATE()),'N','$ip','$email', '$pre', '$resp',NULL,NULL,0,NULL,NULL)";
  23.         sqlsrv_query($conn_sis, $query);
  24.     }              
  25.  
  26.  
  27. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top