Can you explain the join you did for me please in case I have to do something like this again please?
Actually, you might have to tweak it yourself. I selected announcements.*, but you should name those columns that you want to select.
Basically, in your original example, you wanted to select the course_id of a given student, then select all the announcements associated with that course_id. So, both the student and announcements tables have a common course_id. We can then join them:
SELECT * FROM announcements, student WHERE announcements.course_id=student.course_id;
But since we actually want only the announcements for the particular student, we add a AND student.student_user='$student'.