shank888 Posted February 22, 2007 Share Posted February 22, 2007 if($action == 'forum') { /// Shows each catagory $query2="SELECT * FROM `cat`"; $result1=mysql_query($query2, $conn); while ($row2=@mysql_fetch_array($result1)) { @extract ($row2); echo" <table cellspacing='1' width='780'> <tr> <td colspan='4' width='100%'> <em>$cat_name</em> </td> </tr> <tr> <td width='50%'> <b>Forum</b> </td> <td width='10%'> <b>Topics</b> </td> <td width='10%'> <b>Replies</b> </td> <td width='30%'> <b>Most Recent Post</b> </td> </tr>"; /// Shows forums for each catagory $query3="SELECT * FROM `forum` WHERE forum_cat_id = $cat_id"; $result2=mysql_query($query3,$conn); while ($row3=@mysql_fetch_array($result2)) { @extract($row3); echo" <tr> <td width='50%'> <a href='".$filename."?action=topic&cat_id=".urlencode("{$cat_id}")."&forum_id=".urlencode("{$forum_id}")."'> <b>$forum_name</b><br /></a> $forum_desc </td> <td width='10%'> $topic_id </td> <td width='10%'> $post_id </td> <td width='30%'> $recent_post </td> </tr> "; } echo"</table>"; } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ##Display Topics for selected forum Forum /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if($action == 'topic') { if ((!$_GET[cat_id]) || (!$_GET[forum_id])) { // Get topics to get to the first page you would go http://URL.com/name.php?action=forum but how do i get the link section: "<a href='".$filename."?action=topic&cat_id=".urlencode("{$cat_id}")."&forum_id=".urlencode("{$forum_id}")."'> <b>$forum_name</b><br /></a> to go to 'topic' Link to comment https://forums.phpfreaks.com/topic/39580-how-do-i-link-variables/ Share on other sites More sharing options...
skali Posted February 22, 2007 Share Posted February 22, 2007 $_SERVER['QUERY_STRING'] Link to comment https://forums.phpfreaks.com/topic/39580-how-do-i-link-variables/#findComment-191171 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.