Advertisement
Guest User

denora

a guest
Jan 20th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. <?php
  2. #config.php
  3.  
  4. $dbhost="localhost";
  5. $dbuser="***";     
  6. $dbpass="****";          
  7.  
  8. //connection to the database
  9. $dbhandle = mysql_connect($dbhost, $dbuser, $dbpass)
  10.  
  11. or die("Unable to connect to MySQL");
  12.  
  13.  
  14. $sql = "SELECT * FROM chan WHERE channel='#".$_GET['channel']."'";
  15. $result = mysql_query( $sql );
  16. while( $row = mysql_fetch_assoc( $result ) ) {
  17.  
  18. $chanid = $row['chanid'];
  19. $channel = $row['channel'];
  20. $currentusers = $row['currentusers'];
  21. $topic = $row['topic'];
  22. $topicauthor = $row['topicauthor'];
  23. $topictime = $row['topictime'];
  24. $chan_replace = str_replace("#", "", $row['channel']);
  25.  
  26.   ?>
  27. <?php echo $currentusers; ?>
  28.    <?PHP
  29.    }
  30.    ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement