I have the following query:
$querysub = "SELECT subject from mail where user_id='$userid'";
$resultsub = mysql_query($querysub);
$sub = mysql_fetch_array($resultsub);
I try and display it like this but it won't work, it only displays the first row:
if (mysql_num_rows($result) > 0) {
for ($j = 0; $j<mysql_num_rows($result); $j++) {
echo "<tr><td><input type=\"checkbox\"></td><td>$sub[$j]</td>"; }
}
Can anyone help me display all of the rows in the db? Thanks for the help.
It displays the 2 checkboxes for the rows but it doesn't display the actual subject.
Thanks.