I have 2 tables Im retrieving records from.
The first table(lessons) contains a list of lessons for a student to view. I have a second table(progress that logs all the lessons the student already watched. I want to be able to list everything in LESSONS but create check marks next to each row according to what PROGRESS is showing me.
How would I construct the code in PHP.
Here is my solution so far:
select everything from lessons
foreach($result as $row) {
echo "<tr class=\"lessons-row\">";
echo "<td class=\"ltitle\" >" . $row['title'] . "</td>";
select everything from PROGRESS table
loop through PROGRESS table and find record
if record has check mark
echo "<td>checked code</td>";
else
echo "<td>not checked code</td>";
}
echo "</tr>";
}