Kathi r Document
Kathi r Document
1.1 ABSTRACT
Traffic Congestion:
Tamil Nadu faces severe traffic congestion, particularly in major cities like Chennai,
Coimbatore, and Madurai. This congestion leads to longer commute times, increased fuel
consumption, and heightened stress for commuters.
1. Environmental Impact:
The reliance on individual vehicles contributes to air pollution and carbon emissions,
exacerbating environmental concerns such as climate change and air quality degradation.
1
2. Underutilization of Vehicles:
Many vehicles operate with empty seats during daily commutes, representing a missed
opportunity for resource optimization and cost savings for vehicle owners.
Some individuals may lack access to affordable and reliable transportation options,
particularly in rural areas or areas with inadequate public transportation infrastructure.
4. Safety Concerns:
Safety remains a significant concern for commuters, especially when using unfamiliar
transportation methods or sharing rides with strangers.
Coordinating shared rides can be challenging due to the lack of efficient communication
channels and platforms for connecting potential carpooling partners.
2
SYSTEM ANALYSIS
1. Client Devices:
These are the devices used by users to interact with the system. This includes computers,
laptops, tablets, and smart phones. The client devices run a web browser or a dedicated
application to access the city ride.
2. Web Server:
The web server hosts the web application that powers the city ride. It handles client
requests, processes data, and generates dynamic web pages. The server-side logic is
typically implemented using a programming language such as Python, Java, or PHP,
along with a web framework like Django, Flask, Spring Boot, or Laravel.
3. Database Server:
The database server stores all the data related to search rides,bookrides,edit/deleteposts,
etc. It uses a relational database management system (RDBMS) like MySQL,
PostgreSQL, or SQLite to organize and manage the data. The database schema is
designed to ensure data consistency and integrity.
4. Authentication Module:
This module handles user authentication and authorization. It verifies user credentials
(username/password) during the login process and grants appropriate access permissions
based on the user's role (passenger,rider). Authentication may be implemented using
techniques like session-based authentication, token-based authentication (JWT), or
OAuth.
5. Frontend/UI:
The frontend/UI layer provides the user interface through which users interact with the
system. It includes web pages or screens designed using HTML, CSS, and JavaScript
frameworks/libraries like React.js, Angular, or Vue.js. The frontend communicates with
the backend via HTTP requests (RESTful APIs) to fetch or submit data.
3
6. Networking Infrastructure:
7. Security Measures:
The system incorporates various security measures to protect sensitive data and prevent
unauthorized access. This includes encryption of data in transit (HTTPS), secure storage
of passwords (hashed and salted), role-based access control (RBAC), input validation,
and protection against common web vulnerabilities (e.g., XSS, CSRF).
1. Client Devices:
These are the devices used by users (passenger,riders) to access the system. Client
devices could include computers, laptops, tablets, and smartphones. Users interact
with the system through a web browser or a dedicated mobile application.
The web server hosts the web application that powers the attendance management
system. It handles client requests, processes data, and generates dynamic web
pages. The application server is responsible for implementing the business logic of
the system. It may use a combination of programming languages (such as Python,
Java, or Node.js) and frameworks (such as Django, Spring Boot, or Express.js) to
develop the backend logic.
3. Database Server:
The database server stores all the data related to students, faculty, courses, classes,
attendance records, etc. It uses a relational database management system
(RDBMS) like MySQL, PostgreSQL, or SQLite. The database schema is designed
to efficiently store and retrieve data, ensuring data consistency and integrity.
4
4. Authentication and Authorization Service:
5. API Layer:
6. Frontend/UI:
The frontend/UI layer provides the user interface through which users interact
with the system. It includes web pages or screens designed using HTML, CSS,
and JavaScript frameworks/libraries like React.js, Angular, or Vue.js. The
frontend communicates with the backend via HTTP requests to fetch or submit
data.
This module collects attendance data from the database and performs data analysis
to generate insights and reports.
8. Security Measures:
The system incorporates various security measures to protect sensitive data and
prevent unauthorized access. This includes encryption of data in transit (HTTPS),
secure storage of passwords (hashed and salted), role-based access control
(RBAC), input validation, and protection against common web vulnerabilities
(e.g., XSS, CSRF).
5
9. Networking Infrastructure:
1. Login Page:
Clean and simple login form with fields for username/email and password.
Option for users to log in using social media accounts (if applicable).
2. Sign Up Page:
User-friendly registration form with fields for username, email, password, and any
other necessary information.
Validation checks for email format, password strength, and other required fields.
3. Home Page:
Clear and intuitive layout displaying relevant information such as upcoming rides,
popular routes, and recent activity.
6
4. Search Rides:
Search form with fields for origin, destination, date, and time.
Filters and sorting options to refine search results (e.g., by price, departure time,
number of available seats).
Clear presentation of search results with essential ride details and booking options.
5. Post Rides:
Form for posting ride details including departure, destination, date, time, available
seats, and any additional requirements.
6. Profile:
User profile page displaying personal information, contact details, and ride
preferences.
Privacy settings allowing users to control visibility of their profile and ride
history.
7. View Profile:
Display of other users' profiles with relevant information such as name, profile
picture, and ride history.
7
Confirmation button for finalizing ride arrangements.
9. Update Password:
Form for updating password with fields for current password and new password.
Validation checks to ensure password security and match with the current
password.
10. Actions:
Dropdown or menu with various user actions such as editing profile, changing
password, logging out, etc.
Listing of passengers booked for a user's ride with relevant details such as name,
contact information, and pickup location.
8
Option to view detailed information about each booked ride and manage bookings
(e.g., canceling booked rides).
14. Logout:
9
DEVELOPMENT ENVIRONMENT
Computer:
You'll need a computer or laptop for development purposes. The specifications of the
computer depend on the complexity of your project and the software you'll be using.
A modern multi-core processor (e.g., Intel Core i5 or higher, AMD Ryzen 5 or higher)
with sufficient RAM (4GB or more) would be ideal.
Storage:
Adequate storage space is necessary for storing project files, databases, and other
development-related resources. A solid-state drive (SSD) is recommended for faster
read/write speeds.
Monitor:
Internet Connection:
Operating System:
You can choose from various operating systems based on your preference and
compatibility with development tools. Common choices include Windows,
macOS, and Linux distributions like Ubuntu.
10
An IDE provides tools and features for writing, editing, debugging, and
managing code efficiently. Popular choices for web development include
Visual Studio Code, JetBrains IntelliJ IDEA, and Eclipse.
Using a VCS like Git is essential for tracking changes to your codebase,
collaborating with team members, and managing project versions effectively.
Platforms like GitHub, GitLab, or Bitbucket can host your repositories.
Web Server:
Depending on your project requirements, you may need a web server for local
development and testing. Software like Apache HTTP Server or Nginx can
serve your web applications locally.
Programming Languages:
Database Software: Decide on the specific DBMS you'll use for storing and
managing data. Ensure compatibility with your chosen programming language and
framework.
Development Tools:
11
Install necessary development tools and utilities such as debuggers and
browser developer tools.
12
SYSTEM DESIGN
POST_RIDES
13
USERS
14
4.1.2 Table relationship
Define the relationships between tables in your database, including one-to-one,
one-to-many, and many-to-many relationships. Ensure that foreign keys are
properly defined to enforce referential integrity.
15
View Profile
Update Password
Logout
3. Associate Actors with Use Cases:
Driver can perform actions such as Post Ride, View Profile, Update
Password, and Logout.
Passenger can perform actions such as Search Rides, Book Ride, View
Profile, Update Password, and Logout.
4. Refine Relationships:
Define relationships between use cases to show dependencies and
interactions between functionalities.
16
PROJECT DESCRIPTION
1. Login Page:
Description: This module provides the interface for users to log in to their
accounts.
Features:
Option for users to log in using social media accounts (if applicable).
2. Sign Up Page:
Description:
This module allows new users to register for an account on the platform.
Features:
Validation checks for email format, password strength, and other required
fields.
3. Home Page:
Description:
The home page serves as the main interface of the platform, providing an
overview of available rides and relevant information.
17
Features:
4. Search Rides:
Description: This module enables users to search for available rides based
on their travel preferences.
Features:
Search form with fields for origin, destination, date, and time.
5. Post Rides:
Description: Users can use this module to post details of their available
rides for others to see and book.
Features:
Form for posting ride details including origin, destination, date, time,
available seats, etc.
6. Profile:
Description: This module allows users to view and manage their profile
information.
Features:
18
Display of personal information, contact details, and ride preferences.
7. View Profile:
Description: Users can view the profiles of other users on the platform.
Features:
Features:
9. Update Password:
Features:
Form for updating password with fields for current password and new
password.
19
10. Actions:
Description: This module provides various actions that users can perform
on the platform.
Features:
Description: Users can edit or delete their posted rides using this module.
Features:
Description: Users can view rides they have booked using this module.
Features:
Option to view detailed information about each booked ride and manage
bookings.
13. Logout:
Description: Users can log out of the platform using this module.
Features:
20
SYSTEM IMPLEMENTATION
Index.php
<div class="position-relative">
<div>
<div class="home-banner"></div>
</div>
<div class="input-search-container">
<label class="inputLabel-default"
for="input-label-from">FROM</label>
<option value="Ariyalur">Ariyalur</option>
<option value="Chennai">Chennai</option>
21
<option value="Coimbatore">Coimbatore</option>
<option value="Cuddalore">Cuddalore</option>
<option value="Dharmapuri">Dharmapuri</option>
<option value="Dindigul">Dindigul</option>
<option value="Erode">Erode</option>
<option value="Kanchipuram">Kanchipuram</option>
<option value="Kanyakumari">Kanyakumari</option>
<option value="Karur">Karur</option>
<option value="Krishnagiri">Krishnagiri</option>
<option value="Madurai">Madurai</option>
<option value="Nagapattinam">Nagapattinam</option>
<option value="Namakkal">Namakkal</option>
<option value="Nilgiris">Nilgiris</option>
<option value="Perambalur">Perambalur</option>
<option value="Pudukkottai">Pudukkottai</option>
<option value="Ramanathapuram">Ramanathapuram</option>
<option value="Salem">Salem</option>
<option value="Sivaganga">Sivaganga</option>
<option value="Tenkasi">Tenkasi</option>
<option value="Thanjavur">Thanjavur</option>
<option value="Theni">Theni</option>
<option value="Thoothukudi">Thoothukudi</option>
<option value="Tiruchirappalli">Tiruchirappalli</option>
22
<option value="Tirunelveli">Tirunelveli</option>
<option value="Tirupattur">Tirupattur</option>
<option value="Tiruppur">Tiruppur</option>
<option value="Tiruvallur">Tiruvallur</option>
<option value="Tiruvannamalai">Tiruvannamalai</option>
<option value="Tiruvarur">Tiruvarur</option>
<option value="Vellore">Vellore</option>
<option value="Viluppuram">Viluppuram</option>
<option value="Virudhunagar">Virudhunagar</option>
</datalist>
</div>
<option value="Ariyalur">Ariyalur</option>
<option value="Chennai">Chennai</option>
<option value="Coimbatore">Coimbatore</option>
<option value="Cuddalore">Cuddalore</option>
23
<option value="Dharmapuri">Dharmapuri</option>
<option value="Dindigul">Dindigul</option>
<option value="Erode">Erode</option>
<option value="Kanchipuram">Kanchipuram</option>
<option value="Kanyakumari">Kanyakumari</option>
<option value="Karur">Karur</option>
<option value="Krishnagiri">Krishnagiri</option>
<option value="Madurai">Madurai</option>
<option value="Nagapattinam">Nagapattinam</option>
<option value="Namakkal">Namakkal</option>
<option value="Nilgiris">Nilgiris</option>
<option value="Perambalur">Perambalur</option>
<option value="Pudukkottai">Pudukkottai</option>
<option value="Ramanathapuram">Ramanathapuram</option>
<option value="Salem">Salem</option>
<option value="Sivaganga">Sivaganga</option>
<option value="Tenkasi">Tenkasi</option>
<option value="Thanjavur">Thanjavur</option>
<option value="Theni">Theni</option>
<option value="Thoothukudi">Thoothukudi</option>
<option value="Tiruchirappalli">Tiruchirappalli</option>
<option value="Tirunelveli">Tirunelveli</option>
<option value="Tirupattur">Tirupattur</option>
24
<option value="Tiruppur">Tiruppur</option>
<option value="Tiruvallur">Tiruvallur</option>
<option value="Tiruvannamalai">Tiruvannamalai</option>
<option value="Tiruvarur">Tiruvarur</option>
<option value="Vellore">Vellore</option>
<option value="Viluppuram">Viluppuram</option>
<option value="Virudhunagar">Virudhunagar</option>
</datalist>
</div>
</div>
</div>
</form>
</div>
25
</div>
Db_connection.php
<?php
$servername = "localhost";
$username = "root";
$dbname = "project";
// Create connection
// Check connection
if (!$conn) {
?>
26
TESTING
Testing is a critical phase in the development lifecycle of any software project, ensuring that
the system functions as intended and meets the specified requirements. In the context of the
city ride, testing involves verifying the functionality, reliability, and performance of the
system across various modules and scenarios.
Description: Verify that users can log in with valid username and
password.
Steps:
Steps:
27
Expected Result: User should not be able to log in with invalid
credentials.
Steps:
Steps:
28
2. Ride Posting and Management:
Description: Verify that users can post details of their available rides
successfully.
Steps:
Description: Verify that users can edit or delete their posted rides.
Steps to Edit:
Steps to Delete:
29
3. Click on the delete button.
Description: Verify that users can search for available rides based on
different criteria.
Steps:
30
PERFORMANCE AND LIMITATIONS
2. Cost Savings:
Users can save money on transportation expenses by sharing the cost of fuel and
tolls with fellow commuters, making travel more affordable and sustainable.
3. Environmental Sustainability:
By promoting shared mobility and reducing the number of vehicles on the road,
the platform contributes to lower carbon emissions and environmental pollution,
fostering a more sustainable transportation ecosystem.
The platform provides a convenient and accessible way for users to find and offer
rides, enhancing mobility options for individuals who may not have access to
private transportation or reliable public transit.
5. Community Building:
6. Time Savings:
By offering shared rides with pre-planned routes, users can save time on their
daily commutes compared to driving alone or relying on traditional public
transportation schedules.
31
7. Safety and Security:
The platform implements measures to ensure the safety and security of users,
including user authentication, privacy settings, and secure messaging features,
enhancing trust and reliability within the community.
Users have the flexibility to customize their ride preferences, including origin,
destination, date, and time, to meet their specific travel needs and preferences.
9. Data-driven Insights:
The platform generates valuable insights into transportation patterns and user
behaviors, which can inform decision-making processes for urban planning,
infrastructure development, and policy formulation.
With its scalable architecture and modular design, the "City Ride" platform can
accommodate growth in user base and geographic expansion to other regions
beyond Tamil Nadu, offering its benefits to a wider audience.
1. Geographic Limitations:
The success of the platform relies heavily on user participation and adoption. If
there are not enough users actively posting and seeking rides, it may limit the
availability and frequency of ride-sharing opportunities.
32
3. Limited Coverage and Accessibility:
In rural or remote areas with sparse population density, the availability of rides
and users may be limited, reducing the accessibility and usefulness of the platform
for residents in these areas.
4. Reliability of Users:
5. Privacy Concerns:
Users may have concerns about sharing personal information, such as contact
details and pickup locations, with strangers on the platform, which could impact
their willingness to participate in ride-sharing arrangements.
6. Security Risks:
7. Technical Limitations:
33
9. Competitive Landscape:
The platform may face competition from other transportation services and ride-
sharing platforms, which could impact its market share and user base, particularly
if competing services offer additional features or incentives.
External factors such as fuel prices, road conditions, and weather conditions can
influence the availability and desirability of ride-sharing opportunities, affecting
the platform's effectiveness in providing reliable transportation solutions.
Integrate smart routing and navigation features within the platform to provide
users with real-time traffic updates, alternative route suggestions, and estimated
arrival times, enhancing the overall travel experience.
Introduce incentive programs and rewards for users who actively participate in
ride-sharing, such as discounts on future rides, loyalty points, or environmental
incentives to encourage sustainable transportation practices.
34
5. Enhanced Communication Tools:
Improve communication tools within the platform, including group messaging, in-
app notifications, and voice/video calling capabilities, to facilitate seamless
coordination and communication between users.
Partner with local authorities to integrate the platform with carpool lanes and
designated parking facilities, providing additional incentives and benefits for users
who carpool, such as priority access and discounted parking rates.
Expand the platform's geographic coverage to new regions and markets beyond
Tamil Nadu, reaching a broader audience and addressing transportation challenges
in other urban and rural areas.
35
11. Gamification and Social Features:
Introduce gamification elements and social features within the platform, such as
leaderboards, badges, and social sharing capabilities, to incentivize user
engagement and promote community building among users.
Solicit feedback from users through surveys, user interviews, and usability testing
sessions, and use this feedback to iteratively improve the platform's features,
usability, and overall user experience.
36
APPENDICES
9.1 Sample Coding
Sample code:
Includes:
Header.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- Responsive Meta Tag -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Adding Bootstrap CDN - Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" />
<!-- Adding Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-
50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
crossorigin="anonymous" />
<link rel="stylesheet" type="text/css" href="../main/css/app.css" />
<title>CITY RIDE</title>
</head>
<body>
<nav class="navbar navbar-expand-md bg-danger navbar-dark fixed-top">
<div class="container">
<!-- Brand -->
<a class="navbar-brand" href="#">
<img src="../main/img/city.png" class="logo" alt="cityride" width="60px" style="border-radius:
25px;" />
<span class="site-name ml-2">City Ride</span> <!-- Site name added -->
</a>
<!-- Toggler/collapsible Button -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#menu-nav">
<span class="navbar-toggler-icon"></span>
</button>
37
<!-- Navbar links -->
<div class="collapse navbar-collapse justify-content-between" id="menu-nav">
<!-- Left-aligned nav (default) -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link text-white text-uppercase" href="index.php">SEARCH</a>
</li>
<li class="nav-item">
<?php
// Check if user is logged in
session_start(); // Start the session
if (isset($_SESSION['user_id'])) {
// User is logged in, show "Post Rides" option if verified
require_once 'db_connection.php';
$user_id = $_SESSION['user_id'];
$query = "SELECT verificationDetails FROM users WHERE userID = $user_id";
$result = mysqli_query($conn, $query);
38
?>
<a class="nav-link text-white text-uppercase" href="viewprofile.php"
onclick="showVerificationAlert()">POST RIDES</a>
<?php
}
} else {
// User is not logged in, redirect to login page
?>
<a class="nav-link text-white text-uppercase" href="../Login/index.html"
onclick="showLoginPrompt()">POST RIDES</a>
<?php
}
?>
</li>
</ul>
39
<?php
require_once 'db_connection.php';
// Check if user is logged in
if (isset($_SESSION['user_id'])) {
// User is logged in, fetch user's name from the database
// Assuming you have a database connection, replace 'your_database_connection' with your actual
database connection variable
$user_id = $_SESSION['user_id'];
$query = "SELECT username FROM users WHERE userID = $user_id";
$result = mysqli_query($conn, $query);
if ($result) {
$row = mysqli_fetch_assoc($result);
$username = $row['username'];
} else {
// Handle database error
$username = "Guest";
}
} else {
// User is not logged in, set a default value
$username = "Guest";
}
?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" data-toggle="dropdown">
<i class="fas fa-user-circle"></i> <?php echo $username; ?> <!-- Replace with fetched username -->
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="viewprofile.php">View Profile</a>
<a class="dropdown-item" href="pass.php">UPDATE PASSWORD</a>
<a class="dropdown-item" href="logout.php">Logout</a>
</div>
</li>
<?php
40
} else {
// User is not logged in, show Sign In/Sign Up and hide Logout
?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" data-toggle="dropdown">Sign
In/Sign Up</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="../Login/index.html">Sign In</a>
<a class="dropdown-item" href="../Login/signup.php">Sign Up</a>
</div>
</li>
<?php
}
?>
</ul>
</div>
</div>
</nav>
<!-- Adding jQuery library CDN -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Adding Bootstrap CDN - Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<!-- Adding Bootstrap CDN - Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!-- Bootstrap Datepicker JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-
datepicker.min.js"></script>
<!-- Adding JavaScript -->
<script>
function showLoginPrompt() {
alert("Please log in to post a ride.");
}
function showVerificationAlert() {
41
alert("Please verify your account by uploading Aadhar and driving license photos.");
}
</script>
</body>
</html>
Footer.php
42
Login page and Sign Up Page codes:
Login.php
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login - CityRide</title>
<link rel="icon" href=
"../Login/images/icons/cityride.png"
type="image/x-icon">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<link rel="stylesheet" type="text/css" href="../Login/css/main.css">
</head>
<body>
<div class="container">
<h2>Login to CityRide</h2>
<form action="back1.php" method="post">
<div class="form-group">
<label for="username">Username</label>
<input type="text" id="username" name="username" required>
</div>
<div class="form-group password-toggle">
<label for="password">Password</label>
<input type="password" id="password" name="pass" required>
<i class="fas fa-eye" id="togglePassword"></i>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Login</button>
43
</div>
<div class="forgot-password">
<a href="forgot.php">Forgot password?</a>
</div>
<div class="social-login">
<a href="#" class="facebook"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="twitter"><i class="fab fa-twitter"></i></a>
<a href="#" class="google"><i class="fab fa-google"></i></a>
</div>
<p align="center">Create Account<a href="signup.php">Sign up</a></p>
<p align="center"><a href="../main/index.php">use without login</a></p>
</form>
</div>
togglePassword.addEventListener('click', function () {
const type = passwordField.getAttribute('type') === 'password' ? 'text' : 'password';
passwordField.setAttribute('type', type);
this.classList.toggle('fa-eye-slash');
});
</script>
</body>
</html>
Signup.php
<!DOCTYPE html>
44
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="../Login/css/main1.css">
<title>Signup Page</title>
</head>
<style>
form
{
top:10px;
position:absolute;
}
</style>
<body>
<form id="signupForm" action="back.php" method="POST" onsubmit="return validateForm()">
<h2>Sign Up</h2>
<label for="fullName">Full Name:</label>
<input type="text" id="fullName" name="fullName" required>
<label for="gender">Gender:</label>
<select id="gender" name="gender" required>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<span id="emailError" class="error"></span>
45
<label for="phoneNumber">Phone Number:</label>
<input type="text" id="phoneNumber" name="phoneNumber" required>
<span id="phoneError" class="error"></span>
<label for="district">District:</label>
<input type="text" id="district" name="district" required>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<script>
function validateForm() {
var fullName = document.getElementById('fullName').value.trim();
var dateOfBirth = document.getElementById('dateOfBirth').value.trim();
var gender = document.getElementById('gender').value;
var email = document.getElementById('email').value.trim();
var phoneNumber = document.getElementById('phoneNumber').value.trim();
var district = document.getElementById('district').value.trim();
var username = document.getElementById('username').value.trim();
var password = document.getElementById('password').value.trim();
46
} else {
emailError.textContent = '';
}
Swal.fire({
title: 'Success!',
text: 'You have successfully signed up.',
icon: 'success',
confirmButtonText: 'OK'
}).then((result) => {
if (result.isConfirmed) {
// Make an AJAX request to back.php to submit the form data
var xhr = new XMLHttpRequest();
xhr.open("POST", "back.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
// Optionally, you can handle the response from back.php here
// For example, display a message or handle any errors
}
};
xhr.send("fullName=" + fullName + "&dateOfBirth=" + dateOfBirth + "&gender=" + gender +
"&email=" + email + "&phoneNumber=" + phoneNumber + "&district=" + district +
"&username=" + username + "&password=" + password);
}
});
47
// Prevent the form from submitting automatically
return false;
}
</script>
</body>
</html>
Back.php
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Database connection parameters
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "project";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
48
$district = $_POST["district"];
$username = $_POST["username"];
$password = $_POST["password"]; // Get the password
// SQL query to insert values into the database with hashed password
$sql = "INSERT INTO users (fullName, dateOfBirth, gender, email, phoneNumber, district, username,
password)
VALUES ('$fullName', '$dateOfBirth', '$gender', '$email', '$phoneNumber', '$district', '$username',
'$hashedPassword')";
Back1.php
<?php
session_start(); // Start the session
49
$user = "root";
$password = "";
$dbname = "project";
// Create connection
$conn = mysqli_connect($servername, $user, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
if (mysqli_num_rows($result) == 1) {
// Fetch user data from the result
$row = mysqli_fetch_assoc($result);
$userID = $row['userID'];
$hashedPasswordFromDB = $row['password'];
50
// Redirect user to another page (e.g., dashboard.php)
header("Location: ../main/index.php");
exit;
} else {
// Password is incorrect, display error message
echo '<script>
alert("Invalid username or password");
window.location.href = "index.html?login_status=failed";
</script>';
exit;
}
} else {
// Username not found, display error message
echo '<script>
alert("Invalid username or password");
window.location.href = "index.html?login_status=failed";
</script>';
exit;
}
51
9.2 Sample Screens
52
BOOKING SEATS:
53
POST RIDES:
POST RIDES:
54
RIDE POSTED SUCCESSFULLY:
EDIT/DELETE POSTS:
EDIT POST:
55
DELETE POST:
56
OUR PASSENGER DETAILS:
RIDE DETAILS:
57
MY BOOKING RIDES:
EDIT BOOKING:
58
CHANGE PASSWORD:
59
LOGOUT:
60
9.3 Reports
1. User Registration Report:
Summary of new user registrations over a specific time period, including
demographic information such as age, gender, location, and registration source.
2. Ride Posting Report:
Overview of ride postings created by users, including details such as origin,
destination, date, time, available seats, and ride preferences.
3. Ride Booking Report:
Summary of ride bookings made by users, including information on booked rides,
passenger details, booking status, and confirmation timestamps.
4. User Activity Report:
Analysis of user activity on the platform, including metrics such as login
frequency, ride searches, ride postings, messages sent, and bookings made.
5. User Feedback Report:
Compilation of user ratings and reviews submitted for rides and other users,
including average ratings, feedback comments, and sentiment analysis.
6. Performance Metrics Report:
Key performance indicators (KPIs) tracking the platform's performance and
effectiveness, such as user growth, ride availability, booking conversion rates, and
user engagement metrics.
7. Environmental Impact Report:
Assessment of the platform's environmental impact, including metrics such as
carbon emissions saved, vehicle miles reduced, fuel consumption avoided, and
overall sustainability metrics.
8. Geographic Analysis Report:
Geographic distribution analysis of users, rides, and ride demand across different
regions or cities, identifying areas with high user activity and ride-sharing
demand.
9. Trend Analysis Report:
Analysis of trends and patterns in user behavior, ride demand, and platform usage
over time, highlighting seasonal variations, peak periods, and emerging trends.
61
Evaluation of platform compliance with regulatory requirements and security
standards, including data protection measures, privacy policies, and user
authentication protocols.
Welcome to the City Ride platform! This user manual will guide you through the various
features and functionalities of the platform to help you navigate and utilize its services
effectively.
Table of Contents:
1. Getting Started
3. Posting a Ride
5. Booking a Ride
7. Additional Features
1. Getting Started:
62
If you're new to the platform, you'll need to register for an account. Existing users
can log in with their credentials.
Fill out the registration form with your details, including username, email,
password, etc.
3. Posting a Ride:
Fill out the ride posting form with details such as origin, destination, date, time,
available seats, etc.
Click on the submit button to post your ride. Other users will be able to view and
book your ride.
Enter your search criteria, including origin, destination, date, time, etc.
5. Booking a Ride:
Follow any additional instructions provided by the ride poster for confirmation.
63
6. Managing Your Profile:
Access the "Profile" section to view and edit your profile information.
Update your personal details, contact information, and ride preferences as needed.
Ensure your profile is complete and up-to-date for better matching and
communication with other users.
7. Additional Features:
Update your password and review privacy options to ensure your account security.
Refer to the FAQs section for answers to common questions and troubleshooting
tips.
If you can't find the answer you're looking for, contact support for assistance.
64
References Used:
1. ChatGPT (OpenAI):
ChatGPT is an AI language model developed by OpenAI. You can
include a reference to the ChatGPT model and its organization,
OpenAI, as follows:
OpenAI. "ChatGPT - OpenAI." OpenAI, https://openai.com/chatgpt.
2. W3Schools:
W3Schools is a popular online resource for learning web development
technologies. You can include a reference to specific pages or tutorials
that you consulted on the W3Schools website:
W3Schools. "HTML Tutorial - W3Schools." W3Schools,
https://www.w3schools.com/html/.
3. Mentor:
If you received guidance or assistance from a senior mentor, you can
acknowledge their contribution in your project:
[M.SUNDAR]. [Senior Software Manager] Personal communication.
65