Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("steamauth/steamauth.php");
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "tuxtest";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $steamid64 = $user->GetPlayerSummaries($_COOKIE['steamID'])->steamid;
- $sql = "INSERT INTO users (steamid64) VALUES ('$steamid64')";
- $query = mysqli_query($conn, "SELECT * FROM users WHERE steamid64='".$steamid64."'");
- if(mysqli_num_rows($query) > 0){
- echo "YES";
- } else{
- if ($logged == 1) {
- if (mysqli_query($conn, $sql)) {
- } else {
- echo "Error: " . $sql . "<br>" . mysqli_error($conn);
- }
- }
- }
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement