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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.