It is working fine. I want to dispaly the result in table formate. The above code result is coming horizontal. I want the result would be in vertically like the below code. Please let me know if need further information.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[url=http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd[/url]">
<?php
include ("menu.php");
?>
<?php
session_start();
?>
<div id="content">
<div id="primaryContentContainer">
<div id="primaryContent">
<h2>Sample Trading Area<span></span></h2>
<?php
mysql_connect("localhost","root","");//database connection
mysql_select_db("market_codes");
$query = "SELECT * FROM allo where category='Sample TA'";
$result = mysql_query($query) or die(mysql_error());
$num=mysql_numrows($result);
mysql_close();
?>
<table>
<tr class="rowB">
<th>Sl No</th>
<th>Description</th>
<th>Outlet</th>
<th>Trading Area</th>
<th>Food CSI</th>
<th>Reportable</th>
<th>Drug CSI</th>
<th>Reportable</th>
<th>Mass Census</th>
<th>xAOC Co</th>
<th>Deca Census</th>
<th>Sam's Census</th>
<th>BJ's Census</th>
<th>Dollar Gen Cen</th>
<th>Family Dol Cen</th>
<th>Fred Dol Cen</th>
<th>Walmart Mass Cen</th>
<th>Walmart Food Cen</th>
</tr>
<?php
$i=0;
while ($i < $num)
{
$t1=mysql_result ($result, $i, "sl_no");
$t2=mysql_result ($result, $i, "description");
$t3=mysql_result ($result, $i, "outlet");
$t4=mysql_result ($result, $i, "ta");
$t5=mysql_result ($result, $i, "food");
$t6=mysql_result ($result, $i, "report");
$t7=mysql_result ($result, $i, "drug");
$t8=mysql_result ($result, $i, "reportt");
$t9=mysql_result ($result, $i, "mass");
$t10=mysql_result ($result, $i, "xaoc");
$t11=mysql_result ($result, $i, "deca");
$t12=mysql_result ($result, $i, "sma_s");
$t13=mysql_result ($result, $i, "bj_s");
$t14=mysql_result ($result, $i, "dollar");
$t15=mysql_result ($result, $i, "family");
$t16=mysql_result ($result, $i, "fred");
$t17=mysql_result ($result, $i, "walmart_mass");
$t18=mysql_result ($result, $i, "walmart_food");
?>
<tr class="rowA">
<td><?php echo $t1 ?></td>
<td><?php echo $t2 ?></td>
<td><?php echo $t3 ?></td>
<td><?php echo $t4 ?></td>
<td><?php echo $t5 ?></td>
<td><?php echo $t6 ?></td>
<td><?php echo $t7 ?></td>
<td><?php echo $t8 ?></td>
<td><?php echo $t9 ?></td>
<td><?php echo $t10 ?></td>
<td><?php echo $t11 ?></td>
<td><?php echo $t12 ?></td>
<td><?php echo $t13 ?></td>
<td><?php echo $t14 ?></td>
<td><?php echo $t15 ?></td>
<td><?php echo $t16 ?></td>
<td><?php echo $t17 ?></td>
<td><?php echo $t18 ?></td>
</tr>
<?php
$i++;
}
?>