I have a table which displays reviews written by users about products. The problem I am having is that the table isn’t showing everything in the table. In other words, the data I want displayed is coming up but not the whole amount.
This is the code for my table:
<?php
$result = mysql_query("SELECT * FROM reviews WHERE serial = '$id'")
or die(mysql_error()); ;
if (mysql_num_rows($result) == 0) {
echo 'There Arent Any Reviews Yet';
} else {
echo "<table width=100% border='6'><tr><th>Comments/Thoughts</th><th>Ratings</th><th>Date</th><th>User</th>";
while($info = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $info['review']. "</td>";
echo "<td>" . $info['ratings']. " Stars</td>";
echo "<td>" . $info['date']. "</td>";
echo "<td>" . $info['user']. "</td>";
}
}
echo "</tr>";
echo "</table>";
?>
when a user types in a review, only a few words in the table are shown. it seems like there is a limit to how much of the written review can be shown but i do not know where to change that value.
Your while loop needs to include
<tr>tags (a.k.a table row tags) to correctly form the table. You also have a malformed table header.