Location: PHPKode > projects > EasyFest > new/main_forum.php
<?php
include_once("include/db_connection.php");
$tbl_name="forum_question"; // Table name


$sql1="SELECT * FROM $tbl_name ORDER BY (id) DESC";
// OREDER BY id DESC is order result by descending
//$result=mysql_query($sq1l);
$result = MYSQL_QUERY($sql1);
include('header.php');
	include('left1.php');
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Premium Series by Free CSS Templates</title>
<meta name="keywords" content="" />
<meta name="Premium Series" content="" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />

<script language="JavaScript" src="gen_validatorv31.js" type="text/javascript"></script>

<title>Untitled Document</title>
</head>

<body>
<div id="wrapper">
	<!-- start page -->
	<div id="page">
    	  <!-- start content -->
        <div id="prtCnt" align="center">
		<div id="content" align="center">
		  <div class="post">
	    <h2 class="title">&nbsp;</h2>
	    <div class="entry">
<table width="104%" border="0" align="left" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="6%" align="center" bgcolor="#E6E6E6"><strong>#</strong></td>
<td width="34%" align="center" bgcolor="#E6E6E6"><strong>Topic</strong></td>

<td width="34%" align="center" bgcolor="#E6E6E6"><strong>Created By</strong></td>
<td width="17%" align="center" bgcolor="#E6E6E6"><strong>Views</strong></td>
<td width="13%" align="center" bgcolor="#E6E6E6"><strong>Replies</strong></td>
<td width="30%" align="center" bgcolor="#E6E6E6"><strong>Date/Time</strong></td>
<td width="30%" align="center" bgcolor="#E6E6E6"><strong>Actions</strong></td>

</tr>

<?php $numberOfRows = MYSQL_NUM_ROWS($result);
$i=0;

while($i<$numberOfRows){ // Start looping table row
$row=mysql_fetch_array($result);?>
<tr>
<td bgcolor="#FFFFFF"><?php echo $i+1; ?></td>
<td bgcolor="#FFFFFF"><a href="view_topic.php?id=<?php echo $row['id']; ?>"><?php echo $row['topic']; ?></a><BR></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['name']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['view']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['reply']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['datetime']; ?></td>
<td width="5%" align="center" bgcolor="#FFFFFF"><a href="deleteTopic.php?id=<?php echo $row['id'];?>">delete</a></td>
</tr>

<?php
// Exit looping and close connection
$i++;
}
//mysql_close();
?>
<tr>
<td colspan="5" align="right" bgcolor="#E6E6E6"><a href="create_topic.php"><strong>Create New Topic</strong> </a></td>
</tr>
</table>

                    </p>
				</div>
		  </div>
		</div>
        </div>
        <!-- end content -->
		<!-- start sidebars -->
		<!-- end sidebars -->
	  <div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end page -->
</div>
</html>
<?php
	include('footer.php');
?>
Return current item: EasyFest