'Dynamic Tabs content wont display simple data
Hi everyone i dont know what i am doing wrong the content in the tabs are not displaying the links menu works fine Just i dont know why the content is not loading

list database [ id ] coin ]
category databse [ categorylist_id ] categorylist_coin ] categorylist_image ]
<?php
$tab_query = "SELECT * FROM category WHERE categorylist_id GROUP BY categorylist_coin ASC";
$tab_result = mysqli_query($link, $tab_query);
$tab_menu = '';
$tab_content = '';
$i = 0;
while($rows = mysqli_fetch_array($tab_result))
{
if($i == 0)
{
$tab_menu .= '
<li class="active"> <a href="#'.$rows["categorylist_id"].'" data-toggle="tab"><img src="'.$rows["categorylist_image"].'"height="30" width="36" > '.$rows["categorylist_coin"].'</a></li>';
$tab_content .= '
<div id="'.$rows["categorylist_id"].'" class="tab-pane fade in active">';
}
else
{
$tab_menu .= '<li><a href="#'.$rows["categorylist_id"].'" data-toggle="tab"><img src="'.$rows["categorylist_image"].'"height="30" width="36" > '.$rows["categorylist_coin"].'</a></li>';
$tab_content .= '
<div id="'.$rows["categorylist_id"].'" class="tab-pane fade">';
}
Not displaying any data in the content tab
$cetegory_query = "SELECT * FROM list WHERE id = '".$rows["categorylist_id"]."' ";
$result = mysqli_query($link, $cetegory_query);
while($sub_row = mysqli_fetch_array($result))
{
$tab_content .= '
<div class="col-md-3" style="margin-bottom:36px;">
<table class="table table-striped" id="posts" width="100%" cellspacing="0">
<thead>
<tr>
<th><center>name</center></th>
<th><center>owner</center></th>
<th><center>timer</center></th>
<th><center>website</center></th>
</tr>
</thead>
<tr>
<td>'.$sub_row["faucet_name"].'</td>
<td><center>'.$sub_row["owner"].'</center></td>
<td><center>'.$sub_row["timer"].'</center></td>
<td><center>'.$sub_row["Website"].'</center></td></tr> </table>
</div>
';
}
$tab_content .= '<div style="clear:both"></div></div>';
$i++;
}
?>
<ul class="nav nav-tabs">
<?php
echo $tab_menu;
?>
</ul>
<div class="tab-content">
<br />
<?php
echo $tab_content;
?>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
