Here is the relevant code, including the formatting info. I realize that the mysql queries should be changed to mysqli. And that other aspects of this are probably embarrassing. I really have only a slight grasp of what I am doing much of the time.
Code:
$query = "SELECT * FROM temps WHERE user_idm = $_SESSION[user_id]";
$result = mysql_query($query) or die(mysql_error());
echo "<table border='1'>";
echo "<tr> <th>Temperature</th> <th>Notes</th> <th>When entered</th></tr>";
// Print the results, row by row, into a table; using a while loop:
// Use a while loop, to print the results, row by row:
while ($row = mysql_fetch_array($result )) {
// Print out the contents of each row into the table
echo "<tr><td>";
echo $row['temp'];
echo "</td><td>";
echo $row['notes'];
echo "</td><td>";
echo $row['time_entered2'];
echo "</td></tr>";
}
echo "</table>";
Bookmarks