Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php
- $con = mysql_connect("127.0.0.1","root","root");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db("freelobby", $con);
- $ip=$_SERVER["REMOTE_ADDR"];
- $gamertag=$_POST["gamertag"];
- $alias=$_POST["alias"];
- echo "$gamertag";
- echo "<br>";
- echo "$alias";
- echo "<br>";
- echo "$ip";
- echo "<br>";
- // Checking the gamertag
- $buscarusuario = "SELECT * FROM lobby WHERE gamertag = '$gamertag'";
- $resultadouser = mysql_query($buscarusuario);
- if (mysql_num_rows($resultadouser) > 0){
- echo "This gamertag has already been registerd.<br> ";
- echo("Registration not completed.<br>");
- }
- else
- {
- // Checking the alias
- $buscarusuario1 = "SELECT * FROM lobby WHERE alias = '$alias'";
- $resultadouser1 = mysql_query($buscarusuario1);
- if (mysql_num_rows($resultadouser1) > 0){
- echo "This alias has already been registerd.<br> ";
- echo("Registration not completed.<br>");
- }
- else
- {
- echo "alias in use";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement