Hai. I'm trying to link the COURSE to the next page, however, this course can be detected if they are in different course and will direct to its selective course. For the time being, i only managed to run query on one page with different tables for every course. (all course in one page)
the code, where i link the course to the other page
CODE
<table border="1">
<tr>
<td>UnitID</td>
<td>Course</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_chooseUnit['UnitID']; ?></td>
<td><a href="lecturer%20Add%20Result.php?<?php echo $row_chooseUnit['Course']; ?>=<?php echo $row_chooseUnit['Course']; ?>"><?php echo $row_chooseUnit['Course']; ?></a></td>
</tr>
<?php } while ($row_chooseUnit = mysql_fetch_assoc($chooseUnit)); ?>
</table>
This is where i filter every table.
CODE
mysql_select_db($database_CIS, $CIS);
$query_student01 = "SELECT RollNo, Course FROM student where Course LIKE '%IS" . $Course . "%'";
$student01 = mysql_query($query_student01, $CIS) or die(mysql_error());
$row_student01 = mysql_fetch_assoc($student01);
$totalRows_student01 = mysql_num_rows($student01);
$maxRows_student02 = 10;
$pageNum_student02 = 0;
if (isset($_GET['pageNum_student02'])) {
$pageNum_student02 = $_GET['pageNum_student02'];
}
$startRow_student02 = $pageNum_student02 * $maxRows_student02;
mysql_select_db($database_CIS, $CIS);
$query_student02 = "SELECT RollNo, Course FROM student where Course LIKE '%CP" .$Course . "%'";
$query_limit_student02 = sprintf("%s LIMIT %d, %d", $query_student02, $startRow_student02, $maxRows_student02);
$student02 = mysql_query($query_limit_student02, $CIS) or die(mysql_error());
$row_student02 = mysql_fetch_assoc($student02);
if (isset($_GET['totalRows_student02'])) {
$totalRows_student02 = $_GET['totalRows_student02'];
} else {
$all_student02 = mysql_query($query_student02);
$totalRows_student02 = mysql_num_rows($all_student02);
}
$totalPages_student02 = ceil($totalRows_student02/$maxRows_student02)-1;
$maxRows_student03 = 10;
$pageNum_student03 = 0;
if (isset($_GET['pageNum_student03'])) {
$pageNum_student03 = $_GET['pageNum_student03'];
}
$startRow_student03 = $pageNum_student03 * $maxRows_student03;
mysql_select_db($database_CIS, $CIS);
$query_student03 = "SELECT RollNo, Course FROM student where Course LIKE '%IMD" .$Course . "%'";
$query_limit_student03 = sprintf("%s LIMIT %d, %d", $query_student03, $startRow_student03, $maxRows_student03);
$student03 = mysql_query($query_limit_student03, $CIS) or die(mysql_error());
$row_student03 = mysql_fetch_assoc($student03);