Guest User

Untitled

a guest
Mar 6th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. <?php
  2.  
  3. $host = 'localhost';
  4. $port = port;
  5. $user = 'root';
  6. $pass = 'pw';
  7. $db = 'dbname';
  8.  
  9. mysql_connect("{$host}:{$port}", $user, $pass);
  10. mysql_select_db($db);
  11.  
  12. print mysql_result(mysql_query("SELECT COUNT(*) FROM users users WHERE users.online = '1';"), 0);
  13.  
  14. ?>
Add Comment
Please, Sign In to add comment