Advertisement
Guest User

Untitled

a guest
Jun 20th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.19 KB | None | 0 0
  1.  $(document).ready(function() {
  2.                 var saldo = "<?php
  3.                     $db_host = "localhost";
  4.                     $db_name = "steam";
  5.                     $db_username = "dikkeboktor";
  6.                     $db_password = "dikkeVETTEboktor";
  7.                
  8.                     $conn = mysqli_connect($db_host, $db_username, $db_password, $db_name);
  9.                     if (!$conn) {
  10.                         header('Location: error/db_connect.php');
  11.                     }
  12.                
  13.                     require 'steamauth/userinfo.php';
  14.                     $u_id = $steamprofile['steamid'];
  15.                    
  16.                     $sql = "SELECT saldo, level, experience FROM users WHERE id = '$u_id'";
  17.                     $result = $conn->query($sql);
  18.                    
  19.                     if ($result->num_rows > 0) {
  20.                         // output data of each row
  21.                         while($row = $result->fetch_assoc()) {
  22.                             echo $row["saldo"];
  23.                         }
  24.                     } else {
  25.                        
  26.                     }  
  27.                 ?>";
  28.                 $("#saldobutton").text("Saldo: " + saldo);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement