Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Put SQL Details here */
- $sql_host = ""; /* SQL HOST */
- $sql_user = ""; /* SQL USER */
- $sql_pass = ""; /* SQL PASS */
- $sql_db = ""; /* SQL DB */
- $chan = $_GET['chan'];
- $realchan = "#".$chan;
- /* Script for Luke */
- $mysql = mysql_connect($sql_host, $sql_user, $sql_pass);
- $db = mysql_select_db($sql_db);
- $sql = "SELECT topic FROM `chan` WHERE `channel` = '".$realchan."' LIMIT 0 , 30";
- $result = mysql_query($sql);
- if (!$result) {
- print mysql_error();
- }
- while ($row = mysql_fetch_array($result)) {
- echo "Topic: ".$row['topic'];
- }
- /* By Niall Davies ( niall@davies.me ) */
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement