diff --git a/ClassRoster.php b/ClassRoster.php
index de3614f..e1ab2be 100644
--- a/ClassRoster.php
+++ b/ClassRoster.php
@@ -19,22 +19,24 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { //remember the difference between po
$errors[] = 'You forgot to enter the course name';
} else {
$fn = mysqli_real_escape_string($dbc, trim($_POST['course_name'])); //mysqli_real_escape_strin()escapes special characters in a string for use in an SQL statement.
- $sn = mysqli_real_escape_string($dbc, trim($_POST['semester_name']));
- $sy = mysqli_real_escape_string($dbc, trim($_POST['semester_year']));
}
if (empty($errors)) { // If there is no errors. If everything's OK.
// Make the query:
- $q = "SELECT CouLongName, CONCAT(SemesterName, SemesterYear) as SemesterInf, CONCAT(StuLastName, ', ', StuFirstName) as name from Students, Semesters, Courses, StudentClass, ScheduleOfClasses
+ $q = "SELECT CouLongName, CONCAT(SemesterName, Semesters.SemesterYear) as SemesterInf, CONCAT(StuLastName, ', ', StuFirstName) as name from Students, Semesters, Courses, StudentClass, ScheduleOfClasses
WHERE Students.StudentID=StudentClass.StudentID AND
ScheduleOfClasses.CourseID=Courses.CourseID AND
ScheduleOfClasses.ScheduleID=StudentClass.ScheduleID AND
ScheduleOfClasses.SemesterID=Semesters.SemesterID AND
- CouLongName='$fn' AND Semesters.SemesterName='$sn' AND Semesters.SemesterYear='$sy'";
+ CouLongName='$fn'";
$r = @mysqli_query ($dbc, $q); // Run the query.
$num = mysqli_num_rows($r);
- if ($num > 0) { // If it ran OK, display the records
+ if ($num > 0) { // If it ran OK, display the records.
+
+
+
+
// Print how many users there are:
echo "
There is the information for the course you are looking for.
\n";
@@ -63,74 +65,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { //remember the difference between po
mysqli_close($dbc); // Close the database connection.
} // End of the main Submit conditional.
?>
+Class Roster
+
-
-
-
+
\ No newline at end of file
diff --git a/show_roster.php b/ClassRoster_new.php
similarity index 50%
rename from show_roster.php
rename to ClassRoster_new.php
index 7c89739..5c2fd2d 100644
--- a/show_roster.php
+++ b/ClassRoster_new.php
@@ -19,20 +19,26 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { //remember the difference between po
$errors[] = 'You forgot to enter the course name';
} else {
$fn = mysqli_real_escape_string($dbc, trim($_POST['course_name'])); //mysqli_real_escape_strin()escapes special characters in a string for use in an SQL statement.
+ $sn = mysqli_real_escape_string($dbc, trim($_POST['semester_name']));
+ $sy = mysqli_real_escape_string($dbc, trim($_POST['semester_year']));
}
if (empty($errors)) { // If there is no errors. If everything's OK.
// Make the query:
- $q = "SELECT CouLongName, CONCAT(SemesterName, Semesters.SemesterYear) as SemesterInf, CONCAT(StuLastName, ', ', StuFirstName) as name from Students, Semesters, Courses, StudentClass, ScheduleOfClasses
+ $q = "SELECT CouLongName, CONCAT(SemesterName, SemesterYear) as SemesterInf, CONCAT(StuLastName, ', ', StuFirstName) as name from Students, Semesters, Courses, StudentClass, ScheduleOfClasses
WHERE Students.StudentID=StudentClass.StudentID AND
ScheduleOfClasses.CourseID=Courses.CourseID AND
ScheduleOfClasses.ScheduleID=StudentClass.ScheduleID AND
ScheduleOfClasses.SemesterID=Semesters.SemesterID AND
- CouLongName='$fn'";
+ CouLongName='$fn' AND Semesters.SemesterName='$sn' AND Semesters.SemesterYear='$sy'";
$r = @mysqli_query ($dbc, $q); // Run the query.
$num = mysqli_num_rows($r);
if ($num > 0) { // If it ran OK, display the records.
+
+
+
+
// Print how many users there are:
echo "There is the information for the course you are looking for.
\n";
@@ -62,9 +68,47 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { //remember the difference between po
} // End of the main Submit conditional.
?>
Class Roster
-
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index ee996fd..0000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# Helping students make their first PHP-MySQL web form
diff --git a/employee.php b/employee.php
index f5988bc..f090b68 100644
--- a/employee.php
+++ b/employee.php
@@ -99,54 +99,15 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
mysqli_close($dbc); // Close the database connection.
} // End of the main Submit conditional.
+
?>
-
-
-
+Register
+
diff --git a/grade.php b/grade.php
index 2be44e6..a20e2f7 100644
--- a/grade.php
+++ b/grade.php
@@ -62,23 +62,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { //remember the difference between po
} // End of the main Submit conditional.
?>
-
+Search Course Grade by Student Last Name
+
diff --git a/includes/footer.html b/includes/footer.html
index 3809aef..7766696 100644
--- a/includes/footer.html
+++ b/includes/footer.html
@@ -1,11 +1,8 @@
+
-
-
-