StudentPublicCommuter
StudentPublicCommuter
Recycling App
3
1. Introduction
The Riyadh Metro Student Navigation System is a web application
designed to assist students of Al Imam Mohammad ibn Saud Islamic
University in efficiently navigating the Riyadh Metro system,
particularly for reaching the SABIC Station near the College of
Computer and Information Sciences (CCIS). This project fulfills core
requirements outlined in the IS337 course, focusing on delivering a user-
friendly platform that integrates essential features for student
transportation needs.
1.1 Background
With the Riyadh Metro being a critical infrastructure project aimed at
enhancing urban mobility, students require tailored information to
optimize their travel routes, access discounted fares, and understand
metro line connectivity. This application addresses these needs by
providing a centralized platform for metro-related information and
student-specific benefits.
4
This application leverages HTML5, CSS3, JavaScript, and PHP to
deliver a robust, accessible, and visually cohesive solution, ensuring
students can navigate the Riyadh Metro system efficiently while
benefiting from institutional discounts and real-time travel guidance.
5
2. “Welcome” Page
Before Sign In
After Sign In
6
3. “Sign in” page
7
4. “Join us” page
8
9
5. “SABIC station”
10
11
6. Conclusions (2 marks)
6.1 Technologies & Languages Used
1. HTML5/CSS3: For structuring and styling web pages, ensuring
cross-device responsiveness and visual consistency.
2. Setup:
o Place project files in the htdocs folder (e.g., C:\xampp\htdocs\
StudentPublicCommuter).
3. Execution:
o Start Apache and MySQL via XAMPP.
13
7. Appendix
7.1 Most Significant JavaScript Code: Password Validation
& Visibility Toggle
File: script.js
Significance:
14
7.2 Most Critical PHP Code Snippets
Registration Validation (JoinUs.php)
// Check for existing username/email
$check_sql = "SELECT id FROM users WHERE username = '$username' OR email
= '$email'";
$check_result = $conn->query($check_sql);
if ($check_result->num_rows > 0) {
$error = "Username or email already exists!";
} else {
// Insert new user
$sql = "INSERT INTO users (...) VALUES (...)";
}
Why Important:
if ($result->num_rows > 0) {
$user = $result->fetch_assoc();
if (password_verify($password, $user['password'])) {
// Start session and redirect
}
}
Why Important:
15
Password Reset Logic (ForgotPassword.php)
// Update password using prepared statement
$stmt = $conn->prepare("UPDATE users SET password = ? WHERE username
= ?");
$stmt->bind_param("ss", $hashed_password, $username);
if ($stmt->execute()) {
$success = "Password updated successfully!";
}
Why Important:
2. Session Management:
$_SESSION['loggedin'] = true;
$_SESSION['username'] = $user['username'];
o Securely tracks logged-in users.
3. Input Sanitization:
$username = $conn->real_escape_string($_POST['username']);
o Mitigates basic SQL injection risks.
16
Significance:
17