<body> <?php include 'header.php'; ?> <div class = "newmessages"> <h1>New messages</h1> <p > <?php // $course_code = $_GET['course']; //$course_id = Course::get_id($course_code); // $course_id = $_GET['Stuff']; $courses_id = Stuff::get_Courses($_SESSION['person_id']); if (!empty($courses_id)) { foreach ($courses_id as $course_id) { $messages = Stuff::getMessages($course_id); //$studen_name = Persons::get_name($course_id); foreach ($messages as $message) { $s_id = $message['student_id']; $name = Persons::get_name($s_id); $question = $message['question']; echo '<div class="new">'; echo '<h5 >' . $question . ' <a type="link" class="primary" data-toggle="modal" data-target="#ToStuff">Answer</a></h5>'; echo '</div>'; echo '<div class="modal fade" id="ToStuff" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">'; echo '<div class="modal-dialog" role="document">'; echo '<div class="modal-content">'; echo '<div class="modal-header">'; echo '<button type="button" class="close" data-dismiss="modal" aria-label="Close">'; echo '<span aria-hidden="true">×</span>'; echo '</button>';
<?php require '../models/stuff.php'; print_r(Stuff::getMessages('1'));