DBMS Project
DBMS Project
System
Team Members:
1. Samridhi Kanwar-2022UCM2342
2. Ujjwal Singla-2022UCM2355
3. Prateek Singh-2022UCM2362
CHAPTER 1 INTRODUCTION
1.1 Introduction of the Problem Area-
Abstract- College Event Management System is
developed to assist students and faculties in handling
college events such as Technical fests, and other events
which involves registration of users to the events
through a web application.
Functional Dependencies:
{event_id} -> {event_title, event_price, participants, img_link,
type_id}
{type_id} -> {type_title}
This table is in 3rd Normal Form (3NF) and Boyce-Codd Normal Form
(BCNF) as there are no partial or transitive dependencies.
Functional Dependencies:
{event_id} -> {date, time, location}
This table is in 3rd Normal Form (3NF) and Boyce-Codd Normal Form
(BCNF) as there are no partial or transitive dependencies.
3. Event_type(type_id, type_title)
Event Type Table (event_type):
type_id (Primary Key)
type_title
Functional Dependencies:
{type_id} -> {type_title}
This table is in 3rd Normal Form (3NF) and Boyce-Codd Normal Form
(BCNF) as there are no partial or transitive dependencies.
Functional Dependencies:
{usn} -> {name, branch, sem, email, phone, college}
This table is in 3rd Normal Form (3NF) and Boyce-Codd Normal Form
(BCNF) as there are no partial or transitive dependencies.
5. Registered (rid, usn, event_id)
Functional Dependencies:
{rid} -> {usn, event_id}
{usn, event_id} -> {rid}
This table is in 3rd Normal Form (3NF) and Boyce-Codd Normal Form
(BCNF) as there are no partial or transitive dependencies.
Functional Dependencies:
{stid} -> {name, phone, event_id}
{event_id} -> {stid}
This table is in 3rd Normal Form (3NF) and Boyce-Codd Normal Form
(BCNF) as there are no partial or transitive dependencies.
Functional Dependencies:
{sid} -> {st_name, phone, event_id}
{event_id} -> {sid}
This table is in 3rd Normal Form (3NF) and Boyce-Codd Normal Form
(BCNF) as there are no partial or transitive dependencies.
Xampp tutorial –
The github project link is as follows-
https://github.com/SamridhiKanwar/
DBMS_project
First open XAMPP Control.
Run Apache and My_SQL(Click on start) and
click on admin.
The database created (cems) will pop up.
Now open -
http://localhost/College-Event-Management-
System-master/usn.php
1. About Us Page-
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
<?php require 'utils/styles.php'; ?><!--css links. file found in utils
folder-->
</head>
<style>
/* Large rounded green border */
hr.blueline {
border: 10px solid #00004d;
border-radius: 5px;
}
#bj
{
font-size: 22px;
}
</style>
<?php require 'utils/header.php'; ?>
<hr class="blueline">
<div class="col-md-12">
<h1>About Us</h1> <p> Our college Mission is to impart quality technical
education and higher moral ethics associated with skilled training to suit the
modern day technology with innovative concepts,so as to learn to lead the
future with full confidence.</p>
</div>
<hr class="blueline">
</body>
<?php require 'utils/footer.php'; ?>
</html>
2. Contact Us Page-
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
<?php require 'utils/styles.php'; ?><!--css links. file found in utils
folder-->
<head>
<body>
<?php require 'utils/header.php'; ?><!--header content. file found in
utils folder-->
<div class = "content"><!--body content holder-->
<div class = "container">
<div class = "col-md-12"><!--body content title holder with 12
grid columns-->
<h1 style="color:#003300 ; font-
size:38px ;"><strong>Contact Us</strong></h1><!--body content title-->
</div>
</div>
<div class="container">
<div class="col-md-12">
<hr>
</div>
</div>
<div class="container">
<div class="col-md-6 contacts">
<h1 style="color:#000080 ; font-size:42px ; font-
style:bold "><span class="glyphicon glyphicon-user"></span> College</h1>
<p>
<span class="glyphicon glyphicon-envelope"></span>
Email: [email protected]<br>
3. Register Form-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
<?php require 'utils/styles.php'; ?><!--css links. file found in utils
folder-->
</head>
<body>
<?php require 'utils/header.php'; ?>
<div class ="content"><!--body content holder-->
<div class = "container">
<div class ="col-md-6 col-md-offset-3">
<form method="POST">
<label>Student USN:</label><br>
<input type="text" name="usn" class="form-control" required><br><br>
<label>Student Name:</label><br>
<input type="text" name="name" class="form-control" required><br><br>
<label>Branch:</label><br>
<input type="text" name="branch" class="form-control"
required><br><br>
<label>Semester:</label><br>
<input type="text" name="sem" class="form-control" required><br><br>
<label>Email:</label><br>
<input type="text" name="email" class="form-control" required
><br><br>
<label>Phone:</label><br>
<input type="text" name="phone" class="form-control"
required><br><br>
<label>College:</label><br>
<input type="text" name="college" class="form-control"
required><br><br>
$conn->close();
}
else
{
echo"<script>
alert('All fields are required');
window.location.href='register.php';
</script>";
}
}
?>
4. Login Page –
<?php
include_once 'classes/db1.php';?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
<title></title>
<style>
span.error{
color: red;
}
</style>
<?php require 'utils/styles.php'; ?><!--css links. file found in utils
folder-->
</head>
<body>
<?php require 'utils/header.php'; ?><!--header content. file found in
utils folder-->
<div class = "content"><!--body content holder-->
<div class = "container">
<div class ="col-md-6 col-md-offset-3">
<form method="POST"><!--form-->
<!--username field-->
<label>UserName:</label><br>
<input type="text" name="name" class="form-control" required><br>
<label>Password</label><br>
<input type="password" name="password" class="form-control"
required><br>
<button type = "submit" name="update" class = "btn btn-default">Login</button>
</form>
</div><!--col md 6 div-->
</div><!--container div-->
</div><!--content div-->
<?php require 'utils/footer.php'; ?><!--footer content. file found in
utils folder-->
</body>
</html>
<?php
if (isset($_POST["update"]))
{
$myusername=$_POST['name'];
$mypassword=$_POST['password'];
if($mypassword=='admin' && $myusername=='admin')
{
echo "<script>
alert('Login Successfull');
window.location.href='adminPage.php';
</script>";
}
else
{
echo "<script>
alert('Invalid credentials');
window.location.href='login_form.php';
</script>";
}
}
?>
5. Admin Page-
<?php
include_once 'classes/db1.php';
$result = mysqli_query($conn,"SELECT * FROM staff_coordinator s ,event_info ef
,student_coordinator st,events e where e.event_id= ef.event_id and e.event_id=
s.event_id and e.event_id= st.event_id");
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
</head>
<body>
<?php include 'utils/adminHeader.php'?>
<div class = "content">
<div class = "container">
<h1>Event details</h1>
<?php
if (mysqli_num_rows($result) > 0) {
?>
<table class="table table-hover" >
<thead>
<tr>
<th>Event_name</th>
<th>No. of Participents</th>
<th>Price</th>
<th>Student Co-ordinator</th>
<th>Staff Co-ordinator</th>
<th>Date</th>
<th>Time</th>
<th>location </th>
</tr>
</thead>
<tbody>
<?php
$i=0;
while($row = mysqli_fetch_array($result)){
echo '<tr>';
echo '<td>' . $row['event_title'] . '</td>';
echo '<td>' . $row['participents'] . '</td>';
echo '<td>' . $row['event_price'] . '</td>';
echo '<td>' . $row['st_name'] . '</td>';
echo '<td>' . $row['name'] . '</td>';
echo '<td>'.$row['Date'].'</td>';
echo '<td>'.$row['time'].'</td>';
echo '<td>'.$row['location'].'</td>';
echo '<td>'
.'<a class="delete" href="deleteEvent.php?id='.
$row['event_id'].'">Delete</a> '
.'</td>';
echo '</tr>';
$i++;
}
?>
</tbody>
</table>
<?php
}
?>
<a class="btn btn-default" href = "createEventForm.php">Create Event</a><!--
register button-->
</div>
</div>
<?php require 'utils/footer.php'; ?>
</body>
</html>
$img_link=$_POST["img_link"];
$type_id=$_POST["type_id"];
$name=$_POST["sname"];
$st_name=$_POST["st_name"];
$Date=$_POST["Date"];
$time=$_POST["time"];
$location=$_POST["location"];
if(!empty($event_id) || !empty($event_title) || !empty($event_price) || !
empty($participents) || !empty($img_link) || !empty($type_id) )
{
include 'classes/db1.php';
$INSERT="INSERT INTO
events(event_id,event_title,event_price,img_link,type_id)
VALUES($event_id,'$event_title', $event_price,'$img_link',$type_id);";
$INSERT.= "INSERT INTO event_info (event_id,Date,time,location)
Values ($event_id,'$Date','$time','$location');";
$INSERT.="INSERT into
student_coordinator(sid,st_name,phone,event_id)
values($event_id,'$st_name',NULL,$event_id);";
$INSERT.="INSERT into staff_coordinator(stid,name,phone,event_id)
values($event_id,'$name',NULL,$event_id)";
if($conn->multi_query($INSERT)===True){
echo "<script>
alert('Event Inserted Successfully!');
window.location.href='adminPage.php';
</script>";
}
else
{
echo"<script>
alert('Event already exsists!');
window.location.href='createEventForm.php';
</script>";
}
$conn->close();
}
else
{
echo"<script>
alert('All fields are required');
window.location.href='createEventForm1.php';
</script>";
}
}
?>
7. Student Details-
<?php
include_once 'classes/db1.php';
$result = mysqli_query($conn,"SELECT * FROM events,registered r ,participent p
WHERE events.event_id=r.event_id and r.usn = p.usn order by event_title");
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
<title></title>
<?php require 'utils/styles.php'; ?><!--css links. file found in utils
folder-->
</head>
<body><?php include 'utils/adminHeader.php'?>
<div class = "content">
<div class = "container">
<h1>Student details</h1>
<?php
if (mysqli_num_rows($result) > 0) {
?>
<table class="table table-hover" >
<tr>
<th>USN</th>
<th>Name</th>
<th>Branch</th>
<th>Sem</th>
<th>Email</th>
<th>Phone</th>
<th>College</th>
<th>Event</th>
</tr>
<?php
$i=0;
while($row = mysqli_fetch_array($result)) {
?>
<tr>
<td><?php echo $row["usn"]; ?></td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["branch"]; ?></td>
<td><?php echo $row["sem"]; ?></td>
<td><?php echo $row["email"]; ?></td>
<td><?php echo $row["phone"]; ?></td>
<td><?php echo $row["college"]; ?></td>
<td><?php echo $row["event_title"]; ?></td>
</tr>
<?php
$i++;
}
?>
</table>
<?php
}
else{
echo "No result found";
}
?>
</div>
</div>
<?php include 'utils/footer.php'?>;
</body>
</html>
8. Student coordinator-
<?php
include_once 'classes/db1.php';
$result = mysqli_query($conn,"SELECT * FROM student_coordinator s ,events e
where e.event_id= s.event_id");
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
<title></title>
<?php require 'utils/styles.php'; ?><!--css links. file found in utils
folder-->
</head>
<tr>
<th>Name</th>
<th>Phone</th>
<th>Event</th>
<th></th>
</tr>
<?php
$i=0;
while($row = mysqli_fetch_array($result)) {
?>
<tr>
<td><?php echo $row["st_name"]; ?></td>
<td><?php echo $row["phone"]; ?></td>
<td><?php echo $row["event_title"]; ?></td>
<td> <?php echo '<a href="updateStudent.php?id='.$row['event_id'].'"
class = "btn btn-default"> Update</a>'?></td>
</tr>
<?php
$i++;
}
?>
</table>
<?php
}
else{
echo "No result found";
}
?>
</div>
</div>
</body>
<?php include 'utils/footer.php';?>
</html>
<?php
include_once 'classes/db1.php';
$result = mysqli_query($conn,"SELECT * FROM staff_coordinator s ,events e
where e.event_id= s.event_id");
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
<title></title>
<?php require 'utils/styles.php'; ?><!--css links. file found in utils
folder-->
</head>
<body><?php include 'utils/adminHeader.php'?>
<div class = "content">
<div class = "container">
<h1>Staff Co-ordinator details</h1>
<?php
if (mysqli_num_rows($result) > 0) {
?>
<table class="table table-hover" >
<tr>
<th>Name</th>
<th>Phone</th>
<th>Event</th>
<th></th>
</tr>
<?php
$i=0;
while($row = mysqli_fetch_array($result)) {
?>
<tr>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["phone"]; ?></td>
<td><?php echo $row["event_title"]; ?></td>
<td> <?php echo '<a href="updateStaff.php?id='.$row['event_id'].'" class
= "btn btn-default"> Update</a>'?></td>
</tr>
<?php
$i++;
}
?>
</table>
<?php
}
else{
echo "No result found";
}
?>
</div>
</div>
</body>
<?php include 'utils/footer.php';?>
</html>
</head>
<body>
<?php require 'utils/header.php'; ?>
<div class ="content"><!--body content holder-->
<div class = "container">
<div class ="col-md-6 col-md-offset-3">
<form method="POST">
<label>Staff co-ordinator name</label><br>
<input type="text" name="st_name" required class="form-control"><br><br>
<label>Staff co-ordinator phone</label><br>
<input type="text" name="phone" required class="form-control"><br><br>
<button type="submit" name="update" class = "btn btn-default
">Update</button>
</div>
</div>
</div>
</form>
<?php require 'utils/footer.php'; ?>
</body>
</html>
<?php
if (isset($_POST["update"]))
{
$name=$_POST["st_name"];
$phone=$_POST["phone"];
$sql="UPDATE staff_coordinator set phone='$phone',name='$name' where
stid='$id'";
if($conn->query($sql)===true)
{
echo"<script>
alert(' Updated Successfully');
window.location.href='stu_cordinator.php';
</script>";}
else
{
echo"<script>
window.location.href='updateStudent.php';
</script>"}}
?>
11. Registration for an event –
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cems</title>
<?php require 'utils/styles.php'; ?><!--css links. file found in utils
folder-->
</head>
<body>
<?php require 'utils/header.php'; ?>
<div class ="content"><!--body content holder-->
<div class = "container">
<div class ="col-md-6 col-md-offset-3">
<form method="POST">
<label>Student USN:</label><br>
<input type="text" name="usn" class="form-control" required><br><br>
<label>Student Name:</label><br>
<input type="text" name="name" class="form-control" required><br><br>
<label>Branch:</label><br>
<input type="text" name="branch" class="form-control"
required><br><br>
<label>Semester:</label><br>
<input type="text" name="sem" class="form-control" required><br><br>
<label>Email:</label><br>
<input type="text" name="email" class="form-control" required
><br><br>
<label>Phone:</label><br>
<input type="text" name="phone" class="form-control"
required><br><br>
<label>College:</label><br>
<input type="text" name="college" class="form-control"
required><br><br>
<button type="submit" name="update" required>Submit</button><br><br>
<a href="usn.php" ><u>Already registered ?</u></a>
</div>
</div>
</div>
</form>
<?php require 'utils/footer.php'; ?>
</body>
</html>
<?php
if (isset($_POST["update"]))
{
$usn=$_POST["usn"];
$name=$_POST["name"];
$branch=$_POST["branch"];
$sem=$_POST["sem"];
$email=$_POST["email"];
$phone=$_POST["phone"];
$college=$_POST["college"];
if( !empty($usn) || !empty($name) || !empty($branch) || !empty($sem)
|| !empty($email) || !empty($phone) || !empty($college) )
{
include 'classes/db1.php';
$INSERT="INSERT INTO participent
(usn,name,branch,sem,email,phone,college) VALUES('$usn','$name','$branch',
$sem,'$email','$phone','$college')";
if($conn->query($INSERT)===True){
echo "<script>
alert('Registered Successfully!');
window.location.href='usn.php';
</script>";
}
else
{
echo"<script>
alert(' Already registered this usn');
window.location.href='usn.php';
</script>";
}
$conn->close();
}
else
{
echo"<script>
alert('All fields are required');
window.location.href='register.php';
</script>";
}
}
?>
THANKS
&
BEST REGARDS
FROM THE
TEAM