Added discussion feature to site.
[Assignment-Trapper.git] / discussion_board.php
blobfecb54b77d469cfde7853ed4aa85666bfcd3996d
1 <?php
3 include_once("auth.php");
4 include_once("header.php");
7 $sql = 'select topic_id, topic_name, discussion_sticky, topic_description from discussion_topic order by discussion_sticky desc, topic_name, topic_description';
8 $result = mysql_query($sql);
9 while($row = mysql_fetch_array($result)){
10 $html .= '<div class="class_block">';
11 if($row['discussion_sticky'] == 1 ) { $html .= '<img src="./gfx/lightbulb.png">'; } else { $html .= '<img src="./gfx/lightbulb_off.png">'; }
13 $html .= '<a href="./discussion.php?topic='.$row['topic_id'].'" class="topictitle">'.$row['topic_name'].'</a><br><br>
14 '.$row['topic_description'].'
15 </div>';
18 echo $html;