Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?                                                                                                                      
  2. include 'conn.php';
  3.  
  4. $telefon = $_POST['telefon'];
  5. $uuid = $_POST['uuid'];
  6. $username = $_POST['username'];
  7. $password = $_POST['password'];
  8. if (empty($username))
  9.   die("-3");
  10. if (empty($password))
  11.   die("-4");
  12. if (empty($uuid))
  13.   die("-5");
  14. if (empty($telefon))
  15.   die("-6");
  16.  
  17. $sql = "SELECT * FROM users WHERE username='$username' AND password='$password'";
  18. $result = mysql_query($sql) or die(mysql_error());
  19. if (mysql_num_rows($result) < 1)
  20.   die("-1");
  21. if (mysql_num_rows($result) == 1)  {
  22.   $rad = mysql_fetch_array($result);
  23.   $id = $rad['id'];
  24.   $sql = "UPDATE users SET uuid='$uuid' AND telefon='$telefon'";
  25.   mysql_query($sql) or die(mysql_error());
  26.   echo $id;
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement