Replace the for
loop with this:
while($row=mysqli_fetch_array($result)){
echo "<td><strong>From:</strong>".$row["fra"]." <br><strong>To:</strong>
".$row["til"]." <br><strong>Date:</strong> ".$row["dato"]." <br><strong>Clock:
</strong> ".$row["klokkeslett"]."</td>";
echo "<td></td>";
echo "<td></td>";
}
You are telling you program to keep looping through mysql_fetch_array($result)
and assign the fetched record to $row
.
Also, do not forget to take out this line $countRows=mysqli_affected_rows($db);
as you no longer need it.
1
solved First echo database row doesn’t show PHP [duplicate]