Advertisement
Guest User

Index.php

a guest
Aug 20th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2.                                 include('config/config.php');  
  3.                                 mysqli_select_db($conn, $auth_db);
  4.  
  5.                                 $status= 1;
  6.  
  7.                                 $stmt = $conn->prepare("SELECT name FROM characters WHERE online=?");
  8.                                 $stmt->bind_param("i", $status);
  9.                                 $stmt->execute();
  10.                                 $stmt->bind_result($charname);
  11.                                 $stmt->store_result();
  12.                                     if($stmt->num_rows > 0) {
  13.                                         while($stmt->fetch()) {
  14.                                             echo $stmt->num_rows;
  15.                                                                 }
  16.                                 }
  17.                                 ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement