invisionx Posted June 1, 2007 Share Posted June 1, 2007 I am building my own forum but i ran into a problem and i skipped over it and went on and set the forum up and everthing it works great but i wanna add the script that i had problem on. but its pretty basic but Right now the main page lets any user create a topic but it doesnt go under any catagory or anything like that and thats what i want.. ill show you how it looks and how i want it to look it will give you a better view of what i want.. what i got now.. http://69.66.94.187/forum/forum1.php what i want.. http://69.66.94.187/forum/forum2.php how would i do the database and stuff i mean ill show you the script as well so someone can help me. <?php $id=$_GET['id']; $sql = mysql_query(" SELECT f.id, f.topic, f.detail, f.datetime, f.view, f.reply, u.user_name, u.pic FROM forum_question as f LEFT JOIN users as u ON f.userid = u.userid" ); ?> <table width="100%" height="20" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#CFC095" class="Header_box"> <tr> <th width="59%" align="center" bgcolor="#514833" class="background_head"><strong>Topic</strong></th> <th width="15%" align="center" bgcolor="#514833" class="background_head"><strong>Views</strong></th> <th width="10%" align="center" bgcolor="#514833" class="background_head"><strong>Replies</strong></th> <th width="16%" align="center" bgcolor="#514833" class="background_head"><strong>Date/Time</strong></th> </tr> </table> <table width="100%" border="1" bordercolor="CFC095" align="center" cellpadding="0" cellspacing="0" bgcolor="#CFC095" class="Box_border"> <?php while($rows=mysql_fetch_array($sql)){ $datetime = date('D dS M Y, h:i a', strtotime($datetime)); ?> <tr> <td width="59%" bgcolor="#4D4531" class="background"><a href="../index.php?pages=view_topic&id=<? echo $rows['id']; ?>"><? echo $rows['topic']; ?></a><BR></td> <td width="15%" align="center" bgcolor="#4D4531" class="background"><? echo $rows['view']; ?></td> <td width="10%" align="center" bgcolor="#4D4531" class="background"><? echo $rows['reply']; ?></td> <td width="16%" align="center" bgcolor="#4D4531" class="background"><? echo $rows['datetime']; ?></td> </tr> <?php } ?> <tr> <td colspan="5" align="right" bgcolor="#4D4531" class="background"><a href="../index.php?pages=create_topic"><strong>Create New Topic</strong> </a></td> </tr> </table> This script here is called main_forum.php but im making another page for this part which will show what i want to show i hope someone can help me. thank you invisionx Quote Link to comment https://forums.phpfreaks.com/topic/53896-forum/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.