function confirm() { $student_id = $_REQUEST['student_id']; $tutor_id = $_REQUEST['tutor_id']; $match_id = $_REQUEST['match_id']; $match_info = match_info($match_id); if (!$match_id) { return; } if ($student_id) { $request_info = request_info($match_info['request_id']); if ($student_id == $request_info['student_id']) { mark_match_student_acknowledged($match_id); } } else { if ($tutor_id) { if ($tutor_id == $match_info['tutor_id']) { mark_match_tutor_acknowledged($match_id); } } } }
<?php $match_id = $_REQUEST["match_id"]; $match_info = match_info($match_id); $request_info = request_info($match_info['request_id']); $student_info = student_info($request_info['student_id']); $tutor_info = tutor_info($match_info['tutor_id']); ?> <div class=title>Edit Tutoring Match</div> <form method="post"> <input type="hidden" name="action" value="<?php echo $_REQUEST["set_action"]; ?> "> <input type="hidden" name="page" value="edit_match"> <input type="hidden" name="match_id" value="<?php echo $match_id; ?> "> <table> <tr> <td align="right">Student:</td> <td><a href="?set_action=edit_student&page=edit_student&student_id=<?php echo $student_info['id']; ?> "><?php echo $student_info['name']; ?> </a></td>