Advertisement
Guest User

Untitled

a guest
May 29th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <html>
  2. <body>
  3.  
  4. <?php
  5.  
  6.  
  7.  
  8. $con = mysql_connect("127.0.0.1","root","root");
  9. if (!$con)
  10. {
  11. die('Could not connect: ' . mysql_error());
  12. }
  13. $ip=$_SERVER["REMOTE_ADDR"];
  14. $gamertag=$_POST["gamertag"];
  15. $alias=$_POST["alias"];
  16.  
  17. echo "$gamertag";
  18. echo "<br>";
  19. echo "$alias";
  20. echo "<br>";
  21. echo "$ip";
  22. echo "<br>";
  23.  
  24. // Checking the Username
  25. $buscarusuario = "SELECT gamertag FROM lobby WHERE gamertag LIKE '$gamertag'";
  26. $resultadouser = mysql_query($buscarusuario);
  27.  
  28. if (mysql_num_rows($resultadouser) > 0){
  29. echo "Username you've entered already taken.<br> ";
  30. echo("Registration not completed.<br>");
  31. }
  32.  
  33. ?>
  34.  
  35.  
  36. </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement