Hello All-
I am trying to pull some information from a database. I am successfully the information, however, when in the table - the first row of the table (HTML) appears correctly, but any subsequent rows of data on the website are all jammed together on the same row. Hopefully - that makes sense... I was using a printf function but I changed it to see if that was the underlying issue - You will be able to see that with the comments in the HTML.
<p><strong>Membership
Transaction History:</strong></p>
<p> </p>
<table style="width: 100%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td><strong>Date</strong></td>
<td><strong>Transaction ID</strong></td>
<td><strong>Method</strong></td>
<td><strong>Amount</strong></td>
<td><strong>Status</strong></td>
</tr>
<?
/* Get Transactions For Current User */
$t_select = "SELECT * FROM `transactions` WHERE `m_id`='".$sm_id."' ORDER BY time DESC";
$t_result = mysql_query($t_select) or die(mysql_error());
if (mysql_num_rows($t_result)== "0") {
echo "</table><br><p align=\"center\">No Transactions Available.</p>";
} else {
while($t_row = mysql_fetch_array($t_result)) {
$txn_time = $t_row['time'];
$date = date('m/d/Y', strtotime($txn_time));
?>
<tr>
<td><? echo $date;?></td>
<td><? echo $t_row['transaction_id'];?></td>
<td><? echo $t_row['method'];?></td>
<td><? echo $t_row['amount'];?></td>
<td><? echo $t_row['status'];?></td>
</tr>
<?
//$txn_time = $t_row['time'];
//$format = "<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>";
//$date = date('m/d/Y', strtotime($txn_time));
//printf($format, $date, $t_row['transaction_id'], $t_row['method'], $t_row['amount'], $t_row['status']);
?></table><?
}
}
?>
I appreciate everyone's help.