Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- if(!isset($_SESSION['steamid'])) {
- //If user isn't logged
- echo "0";
- } else {
- //If user is logged
- $username = $steamprofile['personaname'];
- $host = "xxxx";
- $dbuser = "xxxx";
- $pass = "xxxx";
- $dbname = "xxxx";
- $dbconn = mysqli_connect($host, $dbuser, $pass, $dbname);
- if (!$dbconn) {
- die("Connection failed: " . mysqli_connect_error());
- }
- $query = "SELECT * FROM Users WHERE username='$username'";
- $result = mysqli_query($dbconn, $query);
- if (mysqli_num_rows($result) > 0) {
- while($row = mysqli_fetch_assoc($result)) {
- echo $row["points"];
- }
- } else {
- //If user isn't found
- echo "0";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement