Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "root";
- $password = "";
- $database = "phpbb";
- mysql_connect('localhost', $username, $password) or die("Unable to connect to MySQL");
- @mysql_select_db($database) or die("Unable to select " . strtoupper($database));
- $name = mysql_query("SELECT * FROM accounts WHERE name = $post_username") or die("MySQL Error.");
- while($row = mysql_fetch_array($name))
- {
- $qname = $row['name'];
- $qtokens = $row['tokens'];
- }
- ?>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>PHP Token Test</title>
- </head>
- <body>
- <h1>Welcome, <b><?php echo $qname ?></b></h1>
- <p>You have <b><?php echo $qtokens ?></b> tokens</p>
- <form method="POST">
- <input type="text" name="username" placeholder="Username" />
- <input type="submit" />
- <?php $post_username = $_POST['username'] ?>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement