Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host="127.0.0.1";
- $port="3308";
- $user="user";
- $password="pass";
- $dbc="trinity_char";
- $chr = mysql_connect("$host:$port", "$user", "$pass", True);
- mysql_selectdb("$dbc", $chr);
- $guid = $_POST['guid'];
- if($chr)
- $name = mysql_query("SELECT name FROM characters WHERE guid=$guid");
- else
- $name = "error";
- echo "
- <script type=\"text/javascript\">
- function isAlphaNumeric(value)
- {
- if (value.match(/^[0-9]+$/))
- return true;
- return false;
- }
- function checkform(f)
- {
- if (f.guid.value == \"\")
- {
- alert(\"Введите guid\");
- return false;
- }
- if (!isAlphaNumeric(f.guid.value))
- {
- alert(\"Запрещенные символы в guid\");
- return false;
- }
- }
- </script>";
- echo "
- <font color=#00CC00>
- </font><br><br>
- <center>
- <form method=post action=index.php?id=lol onsubmit=\"return checkform(this)\">
- <table>
- <center>
- <tr>
- <td colspan=2 style=\"text-align: center;\">$name</td>
- </tr>
- <tr>
- </tr><td><b>*GUID:</b></td>
- <td><input type=text name=guid maxlength=10></td>
- </tr>
- <center>
- <tr>
- <td colspan=2 style=\"text-align: center;\"><br><input type=submit value=Узнать ник></td>
- </tr>
- </table>
- </form></center>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement