Jump to content

use PHP to populate SPRY tabbed panels?


cheeseus

Recommended Posts

Hi everyone,

I am trying to install a tabbed panels section on my site where I can display news from different categories, i.e. first query the DB and take out the different categories and write them as the TAB names. Then, with another query, display news from the corresponding category in the corresponding tab. But all I get is the categories and then the news from only one category.

Here's the code:

<div id="TabbedPanels2" class="VTabbedPanels">
                
                <ul class="TabbedPanelsTabGroup">
                	<?php
				$section_query = mysql_query("SELECT * FROM az_sections ORDER BY section_id ASC",$connect);
				while($row = mysql_fetch_array($section_query))
				{
					echo "<li class='About' tabindex='0'>".$row['section']."</li>";
				}				
				?>
                </ul>
                
                <div class="AboutContentGroup">                
                	<?php
				$article_query = mysql_query("SELECT * FROM az_articles WHERE issue = 'February 2008' ORDER BY art_id ASC",$connect);
				while($arow = mysql_fetch_array($article_query))
				{
					echo "<div class='ContentAbout'>".$arow['art_title']."  ".$arow['section']."</div>";
				}				
				?>
                </div>
                
             </div>

 

Can anyone help?

Link to comment
https://forums.phpfreaks.com/topic/92410-use-php-to-populate-spry-tabbed-panels/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.