You are on page 1of 48

A MINI PROJECT REPORT

ON
WEB BASED COLLEGE ADMISSION SYSTEM
Submitted by

DHEERAJ PANDEY-U1746049

BACHELOR OF COMPUTER APPLICATIONS

CENTRE OF COMPUTER EDUCATION

INSTITUTE OF PROFESSIONAL STUDIES


UNIVERSITY OF ALLAHABAD
PRAYAGRAJ

DECEMBER – 2019

1
CERTIFICATE

This is to certify that the Mini Project report entitled “WEB BASED COLLEGE
ADMISSION SYSTEM” submitted by DHEERAJ PANDEY . The project report is
approved for submission towards partial fulfillment of the requirement of
BACHELOR OF COMPUTER APPLICATIONS in CENTER OF COMPUTER
EDUCATION from “INSTITUTE OF PROFESSIONAL STUDIES,
UNIVERSITY OF ALLAHABAD, PRAYAGRAJ (U.P.)”

Prof. R.R.Tewari

(Course Coordinator)

Centre of Computer Education


IPS,UOA,Prayagraj

2
CERTIFICATE

This is to certify that the Mini Project report entitled “WEB BASED COLLEGE
ADMISSION SYSTEM” submitted by DHEERAJ PANDEY. The project report is
approved for submission towards partial fulfillment of the requirement of
BACHELOR OF COMPUTER APPLICATIONS in CENTER OF COMPUTER
EDUCATION from “INSTITUTE OF PROFESSIONAL STUDIES, UNIVERSITY
OF ALLAHABAD, PRAYAGRAJ (U.P.)”

(Internal Examiner) (External Examiner)

Date: 14/12/2019

3
DECLARATION

I hereby declare that the project entitled “WEB BASED COLLEGE ADMISSION
SYSTEM” which is being submitted in partial fulfillment of the requirement for
award of the BACHELOR OF COMPUTER APPLICATIONS in CENTER OF
COMPUTER EDUCATION to “INSTITUTE OF PROFESSIONAL STUDIES,
UNIVERSITY OF ALLAHABAD, PRAYAGRAJ (U.P.)” is an authentic record of
our own work done under, CENTER OF COMPUTER EDUCATION, INSTITUTE
OF PROFESSIONAL STUDIES, UNIVERSITY OF ALLAHABAD,
PRAYAGRAJ(U.P.).

The matter reported in this Project has not been submitted earlier for the award of
any other degree.

Dated: 14/12/2019 Dheeraj Pandey

Place: PRAYAGRAJ

4
ACKNOWLEDGEMENTS

I take this opportunity to express deep sense of gratitude to “Prof. R.R. Tewari”,
Course Coordinator of “Center of Computer Education” for his encouragement and
kind approval. Also I thank him in providing the computer lab facility. I would like
to express our sincere regards to him for advice and counseling from time to time.

I owe thanks to Ms. SARIKA YADAV (Project Guide) and all the lecturers in
“Center of Computer Education” for their advice and counseling time to time.

Dated: 14/12/2019 DHEERAJ PANDEY

Place: PRAYAGRAJ

5
TABLE OF CONTENTS
1. INTRODUCTION & OBJECTIVE

PROJECT DEFINITION

PROJECT DESCRIPTION

2. SOFTWARE AND HARDWARE REQUIREMENT SPECIFICATION

OBJECTIVE OF SRS

HARDWARE CONFIGURATION

SOFTWARE CONFIGURATION

3. SYSTEM DESIGN

DATA FLOW DIAGRAM (DFD)

4. CODING

5. COST ESTIMATION OF PROJECT

6. FUTURE SCOPE

7. CONCLUSION

8. SOUREC CODE

9. BIBLIOGRAPHY

6
INTRODUCTION

Web Based College Admission System is aimed at developing an online


admission application for a college. This system is an online system that can be
accessed throughout the organization and outside as well with proper login
provided. Our system has two type of accessing modes, administrator and user.
Student management system is managed by an administrator. It is the job of the
administrator to admit and monitor the whole process. When a user log in to the
system. He would only view details of the student. He can't perform any changes
.The system has two modules. They are user Administrator Students logging is to
apply for the course by filling an application form provided by online. College
principal/administrator logging in may also access/search information put up by the
students.

PROJECT IDENTIFICATION OF NEED

As the strength of the students is increasing at a tremendous speed, manual


maintenance of student admission is very difficult. Hence, the need for online
admission is inevitable. In case of manual system they need a lot of time,
manpower etc. Here almost all work is computerized. So the accuracy is
maintained. Maintaining backup is very easy. It can do with in a few minutes.

STUDY OF EXISTING SYSTEM

Today in colleges student details are entered manually. The student details in
separate records are tedious task. Referring to all these records and updating is
needed. There is a chance for more manual errors.
1.When the student come in college.
2. First of all, he/she takes admission from reception.
3. Fills it and submits it into office.

4. Filled form is first checked with documents like merit list an details came
from university and verified by an official person , if there is any mistake
then it is corrected.

5. At the time of submission of it the fees is deposited by the candidate.

6. At the time of submission of admission form admission no. is assigned to

7
the candidate by the institute.

7. Candidate gets the receipt of fees deposition.

Disadvantages of Present System:-

1. Require much man power i.e. much efforts, much cost and hard to
operate and maintain.

2. Since, all the work is done in papers so it is very hard to locate


a particular student record when it is required.

PROPOSED SYSTEM

The main goal of the system is to automate the process carried out in the
organization with improved performance and realize the vision of paperless
admission. Some of the goals of the system are listed below: Manage large
number of student details. Manage all details of student who registered for the
course Create student accounts and maintain the details effectively. View all the
details of the students. Reduce the work load in interview the students for selection
Activities like updating, modification, deletion of records should be easier.

ADVANTAGES OF PROPOSED SYSTEM


The aim of the proposed system is to address the limitations of the current
system. The requirements for the system have been gathered from the defects
recorded in the past and also based on the feedback from users of previous
metrics tools. Following are the objectives of the proposed system: Reach to
geographically scattered students. One of the important objectives of the
admission system is communicate with all the students scattered geographically.
Reducing time in activities. Reduce the time taken process the applications of
students, admitting a student, conducting the online examination, verify student
marks, and send call letters to selected students. Paperless admission with
reduced manpower. Reduce the manpower needed to perform all the admission
and administration task by reducing the paper works needed. Cost cutting.
Reduce the cost involved in the admission process. Operational efficiency.
Improve the operational efficiency by improving the quality of the process.

REGISTRATION & LOGIN SYSTEM

Applicants will carry out their own registration, providing the system with a way to
associate a user to their application(s). This will enable the system to display

8
personalized information when the user logs in and certain information, such as
name and address, to be added to each application automatically. Giving each
student a specific ID will also allow a user to apply to a number of courses, while
giving the system a way to prevent unnecessary duplication of applications.
Requiring a registration process will also add greater security to the system, as
once a user has logged in with their username and password, they will be the
only person able to update their information and the only person to make
applications on their behalf.

SOFTWARE AND HARDWARE REQUIREMENT SPECIFICATION

OBJECTIVE OF SRS

The objective of this SRS document is to specify software requirements of the


Online Admission for the college. It is intended to be a complete specification of
what functionality the admission provides. The main purpose of the system is to
automate the task carried out by different peoples in the organization to perform the
student admission.

OVERVIEW OF SRS

SRS will include two sections.

Overall Description will describe major components of the system,


interconnection and external interfaces.

OVERALL DESCRIPTION
The SRS document will give further details on the overall product description,
including the hardware, software, and communications interfaces, product
functions, user characteristics, and any assumptions that will be made.

HARDWARE CONFIGURATION

System : Multimedia PC

Processor : Pentium 4 or above

Memory : 512MB RAM

Hard Disk : 80GB or above

Keyboard : 104 standards

9
Monitor : SVGA

Modem : Dial up/Broadband

SOFTWARE CONFIGURATION

Frontend: PHP, HTML, CSS, JavaScript

Back end: MYSQL

Operating System: Windows.

SYSTEM DESIGN

The system design develops the architectural detail required to build a system or
product. As in the case of any systematic approach, this software too has
undergone the best possible design phase fine tuning all efficiency, performance
and accuracy levels. The first step in system designing is to determine how the
output is to be produced and in what format. Samples of the output and input are
also presented. In the second step, input data and master files are to be designed to
meet requirement of the proposed output. The processing phases are handled
through program construction and testing, including a list of the programs needed to
meet the systems objectives and complete documentation.

1 .User module
2. .Administrator module

DATA FLOW DIAGRAM

10
11
12
13
CODING

A code is an ordered collection symbols to provide unique identification of


data.Codes

can be used by people who do not with data processing; the following are
characters of a
good code generation. Characteristics of good coding
are

Uniquenes
s

Meaningfulness

Stability

Uniform Size and


Format

Simplicity

Concisenes
s

Versatility

The goal of the coding or programming phase is to translate the design of the
system produced during the design phase into code in a given programming
language, which can be executed by a computer and that performs the
computation specified by the design. The coding phase affects both testing and
maintenance profoundly. As we saw earlier, the time spent in coding is a small
percentage of the total software cost , while testing and maintenance consume the
major percentage. Thus it should be clear the goal during coding should not be to
reduce the implementation cost, but the goal should be to reduce the cost of later
phases, even if it means that the cost of this phase has to increase. In other words,
the goal during this phase is not to simplify the job of the programmer. Rather the
goal should be to simplify the job of the tester and the maintainer very easily.
neutral, the script cannot be captured via a browser Is View Source capabilities.
HTML code. The code written for the proposed system consists of many PHP files
which execute on the web server and return output as HTML to the browser.

14
TECHNOLOGY SPECIFICATIONS

PHP (Hyper text Preprocessor) PHP, which stands for "PHP: Hypertext
Preprocessor" is a widely-used Open Source general-purpose scripting language
that is especially suited for Web development and can be embedded into HTML. Its
syntax draws upon C, Java, and Perl, and is easy to learn. The main goal of the
language is to allow web developers to write dynamically generated web pages
quickly, but you can do much more with PHP.

COST ESTIMATION OF THE PROJECT


The most cost estimation procedures focus on estimating effort in terms of
person- months (PM). By properly including the "overheads" (i.e., the cost of
hardware, software, office space, etc.) in the cost of a person-month, effort
estimates can be converted into cost. For a software development project, effort
and schedule estimates are essential prerequisites for managing the project.

SCOPE & FUTURE SCOPE


1. Website and online portal for admission should be prepared well in advance
and ready portal should be demonstrated to the Admission Committee of the
college before final selection of the service provider. After the section of the
service provider selected party must present a trial run to the Admission
Committee before the commencement of receiving online applications.

2. An applicant should be able to fill up the form directly without any login. But a
user id and password should be provided to applicant before payment of online
application fee.

3. Form structure should consist of all the data needed for registration (old form
may be used as reference).

4. Students should be able to apply for 2 honours subjects within one form
mentioning the preference as 1 and 2.

5. Subject specific constraints for submission of online application for admission


are as follows: An applicant intends to apply for Education Honours should have
History as a subject in class 12, for sociology an applicant should have political
science or history as a subject in class 12, for statistics an applicant should
have mathematics as a subject in class 12, for geography an applicant should
have geography as a subject in class 12.

15
6. An applicant should be able to pay the online application fees both online
and offline in bank. In case of offline payment the service provider should
update the payment status in admission portal after getting the data from the
concerned bank.

7. A rank list (on the basis of merit) of all applicants and Merit list (on the basis
of number available seats) should be prepared two days before the date of
publication of these lists in the website to the Admission Committee for
verification. The duly checked lists a referred above are to published in the
admission portal at the scheduled date and time. There may be the need of
publication of 1at, 2nd and 3rd waiting lists as well.

8. Merit point (subject mark + total mark) must be visible while filling up the
form.

9. After the counseling the list of selected applicants eligible for admission will
be sent to the service provider and the service provider is to provide the facility
of admission by generating online challan which should be taken by students to
bank for payment. If applicant selected for admission intends to pay admission
fee through online payment system, the arrangement for the same is to made
by the service provider.

10. The total data for admitted students in the prescribed format should be sent
to college after completion of admission process.

11. Identity card of the students should be prepared and submitted to the
college principal within 15 days from last date of admission.

12. Payment will be made to the service provider only after satisfactory
completion of all the work as stated above.

The future scope of this project is very broad Few of them are: This can be
implemented in less time for proper admission process This can be accessed
anytime anywhere, since it is a web application provided only an internet
connection. The user had not need to travel a long distance for the admission
and his/her time is also saved as a result of this automated system

CONCLUSION
This system, being the first we have created in PHP, has proven more difficult than
originally imagined. While it may sound simple to fill out a few forms and process
the information, much more is involved in the selection of applicants than this. Every
time progress was made and features were added, ideas for additional features or
methods to improve the usability of the system made themselves apparent.
Furthermore, adding one feature meant that another required feature was now
16
possible, and balancing completing these required features with the ideas for
improvement as well as remembering everything that had to be done was a project
in itself. Debugging can sometimes be a relatively straight forward process, or rather
finding out what you must debug can be. Since so many parts of the admissions
system are integrated into one another, if an error occurs on one page, it may be a
display error, for example; it may be the information is not correctly read from the
database; or even that the information is not correctly stored in the database
initially, and all three must be checked on each occasion. This slows down the
process and can be frustrating if the apparent cause of a problem is not obvious at
first. Language used must be simple and easy to understand and compatibility is
paramount. If this system were not designed as an entirely web based application, it
would not have been possible to recreate its current state of portability. Overall, the
system performs well, and while it does not include all of the features that may have
been desired, it lives up to initial expectations. The majority of features that are
included work flawlessly and the errors that do exist are minor or graphical.

17
SOUREC CODE
 INDEX.PHP
<?php include 'includes/header.php';?>
<ul class="slideshow">
<li class="show"><img width="680" height="250"
src="images/home_1.jpg" /></li>
<li><img width="680" height="250"
src="images/home_1.jpg" alt="&quot;We are best among
best&quot;" /></li>
</ul>

<div id="content">
<div class="content_item">
<h1>Welcome</h1>
<p>Dear Allahabad University Fraternity,
Since antiquity Allahabad has been rightly described as a
sacred city.
It is also the heart of the Indo-Gangetic plain with a
multicultural mosaic.
It is a place where nature chooses to converge Ganga,
Yamuna and Saraswati into Sangam that attracts billions from
all over the world to seek spiritual solace and peace.
In this sacred space as India advanced towards modernity, it
gave birth to one of the most important institutions of the world
- Allahabad University.
This seat of higher learning soon acquired the rare distinction
of producing students who guided and continue to guide the

18
destiny of India in a variety of ways.
They not only facilitated India’s freedom from colonial rule but
also contributed to evolve and strengthen the country’s
Institutions both in India and abroad.
The University’s contribution to politics, education, law,
science, technology, engineering, entrepreneurship, literature,
social sciences, films and health care is unparalleled.
It continues to benefit and inspire humanity all over the world
even today.:</p>
<p style="float: right"><img src="images/a.png"
style="float:left" height="100" width="100" alt="imag"
class="img-reponsive thumbnail" />Allahabad University has
always occupied an esteemed place among the universities of
India for over a century now.
Established on 23rd September 1887, it is the fourth
oldest university of India after Calcutta, Bombay and Madras
University. The credit for conceiving a large Central College at
Allahabad, eventually to develop into a University, is due to Sir
William Muir, then Lt. Governor of United Provinces.
As a result of his initiative the foundation stone of the
Muir Central College (named after him) was laid on Dec. 9
1873 by His Excellency Lord Northbrook. Sir William Muir said
on that occasion: <p>
<br style="clear:both"/>
</div><!--close content_item-->
</div><!--close content-->
</div><!--close site_content-->
<?php require 'includes/footer.php';?>

19
20
USER LOGIN
<?php include 'includes/header.php';?>
<?php sidebar_navigation_id();?>
<?php session_start(); ?>
<?php
if (isset($_POST['user_login'])) {
$errors = array();

$required_field = array('username', 'password');


foreach ($required_field as $filedname) {
if (!isset($_POST[$filedname]) ||
empty($_POST[$filedname])) {
$errors[] = $filedname;
}
}

$field_with_length = array('username' => 30,


'password' => 30);
foreach ($field_with_length as $filedname =>
$max_length) {

21
if
(strlen(trim(mysql_prep($_POST[$filedname]))) >
$max_length) {
$errors[] = $filedname;
}
}
$username = mysql_prep($_POST['username']);
$password = mysql_prep($_POST['password']);

if(empty($errors)) {
$query = "SELECT id, username ";
$query .= "FROM students ";
$query .= "WHERE username =
'{$username}' ";
$query .= "AND password = '{$password}'
";
$query .= "LIMIT 1";
$result = mysql_query($query,
$connection);
confirm_query($result);
if (mysql_num_rows($result) == 1) {
//user authebticated

22
$found_user =
mysql_fetch_array($result);
$_SESSION['id'] = $found_user['id'];
$_SESSION['username'] =
$found_user['username'];
redirect_to("index.php");
} else {
$message = "The username/password
is incorrect.";
}
} else {
if (count($errors) == 1) {
$message = "There was 1 error in the
form.";
} else {
$message = "There were " .
count($errors) . " errors in the form.";
}
}
} else {
if (isset($_GET['logout']) && $_GET['logout'] ==
1) {
$message = "You are now logged out";
23
}
$username = "";
$password = "";
$c_password= "";
}

?>
<div id="content">
<div class="content_item">
<h2>Welcome</h2>
<p class="selected">Log In to Continue :</p>
<?php if (!empty($message)) { echo "<p
class=\"errors\">{$message}</p>"; } ?>
<?php if (!empty($errors)) { echo "<p
class=\"errors\">Please review the following field : <br />";
foreach ($errors as $error) {echo "-
{$error}<br />"; } echo "</p>";} ?>
<form action="" method="POST">
<div style="width:120px;
float:left;"><p>Username</p></div>
<div style="width:430px;
float:right;"><p><input class="contact" type="text"
name="username" value="" /></p></div>
24
<br style="clear:both;" />
<div style="width:120px;
float:left;"><p>Password</p></div>
<div style="width:430px;
float:right;"><p><input class="contact" type="password"
name="password" value="" /></p></div>
<br style="clear:both;" />
<div style="width:430px; float:right;"><p
style="padding-top: 15px"><input class="submit"
type="submit" name="user_login" value=" Log In "
/></p></div>
</form>
<br style="clear:both;" />
<div style="width:200px; float:left;"><p><a
href="./index.php">Return to Public site</a></p></div>
</div><!--close content_item-->
</div><!--close content-->
</div><!--close site_content-->
<?php require ("footer_admin.php");?>

25
ADMIN INDEX
<?php require_once ("../includes/session.php");?>
<?php confirm_logged_in(); ?>
<?php require_once ("../includes/connection.php");?>
<?php require_once ("../includes/functions.php");?>
<?php require_once ("../includes/session.php");?>

<?php confirm_logged_in(); ?>


<?php sidebar_navigation_id();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">

<head>
<title>University of Allahabad</title>
<meta name="description" content="free website
template" />
<meta name="keywords" content="enter your keywords
here" />
<meta http-equiv="content-type" content="text/html;
charset=utf-8" />
26
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<link rel="stylesheet" type="text/css"
href="../css/style.css" />
<script type="text/javascript"
src="../js/jquery.min.js"></script>
<script type="text/javascript"
src="../js/image_slide.js"></script>
</head>

<body>
<div id="main">
<div id="header">
<div id="banner">
<div id="welcome">
<h1>University of Allahabad</h1>
</div><!--close welcome-->
<div id="welcome_slogan">
<h1>Web Based Collage Admission System</h1>
</div><!--close welcome_slogan-->
</div><!--close banner-->
</div><!--close header-->

27
<?php $basename =
substr(strtolower(basename($_SERVER['PHP_SELF'])),0,str
len(basename($_SERVER['PHP_SELF']))-4);?>
<div id="menubar">
<ul id="menu">
<li <?php if ($basename == 'index') echo '
class="current"'; ?>><a href="index.php">Home</a></li>
<li <?php if ($basename == 'programs') echo '
class="current"'; ?>><a
href="programs.php">Programs</a></li>
<li <?php if ($basename == 'fees') echo '
class="current"'; ?>><a href="fees.php">Fees</a></li>
<li <?php if ($basename == 'students') echo '
class="current"'; ?>><a
href="students.php">Student</a></li>
<li <?php if ($basename == 'admission') echo '
class="current"'; ?>><a
href="admission.php">Admission</a></li>
</ul>
</div><!--close menubar-->

<div id="site_content">

<div class="sidebar_container">

28
<div class="sidebar">
<div class="sidebar_item">
<h2>Latest Update</h2>
</div><!--close sidebar_item-->
</div><!--close sidebar-->
<?php
$page_set = get_all_page();
while ($page = mysql_fetch_array($page_set)) {
echo "<div class=\"sidebar\">
<div class=\"sidebar_item\">
<h3";
if($page['id'] == $sel_page) {
echo " class=\"selected\"";
}

echo "><a href=\"edit_update.php?page=" .


urlencode($page['id']) . "\">{$page['menu_name']}</a></h3>
<p><a href=\"edit_update.php?page=" .
urlencode($page['id']) . "\">{$page['content']}</a></p>
</div><!--close sidebar_item-->
</div><!--close sidebar-->";
}
29
?>
<div class="sidebar">
<div class="sidebar_item">
<h2><a href="new_update.php">+ Add a new
Update</a></h2>
</div><!--close sidebar_item-->
</div><!--close sidebar-->
<div class="sidebar">
<div class="sidebar_item">
<h2>Contact</h2>
<p style="font-size: 10px">Phone: 9452059159</p>
<p style="font-size: 10px">Developed by: <a
href="facebook.com/createnetworksng"></a></p>
<p style="font-size: 10px">Email: <a
href="mailto:dheerajohm01@gmail.com">dheerajohm01@g
mail.com</a></p>
</div><!--close sidebar_item-->
</div><!--close sidebar-->
</div><!--close sidebar_container-->
<div id="content">
<div class="content_item">

30
<h1>Welcome <?php echo
$_SESSION['username'];?></h1>
<p><?php if (isset($_GET['prog']) && $_GET['prog'] ==
1) { echo "Your Program has been Successfully added";} ?
></p>
<p><ul>
<li>Click on sidebar to manage Website
Content</li>
<li><a href="add_admin.php">Add Staff
Users</a></li>
<li><a href="logout.php">LogOut</a></li>
</ul></p>

</div><!--close content_item-->
</div><!--close content-->
</div><!--close site_content-->
<?php require ("footer_admin.php");?>

31
ADMISSION
<?php require_once ("../includes/session.php");?>
<?php confirm_logged_in(); ?>
<?php require ("header_admin.php");?>
<?php
$sum = 0;
$query = "SELECT * FROM students";
$result = mysql_query($query);
// while ($students = mysql_fetch_array($result)) {
// $sum = $sum + $students['fee'];
// }

$sums = 0;
$queryz = "SELECT * FROM students WHERE
admission_status = 1";
$resultz = mysql_query($queryz);
// while ($studentz = mysql_fetch_array($resultz)) {
// $sums = $sums + $studentz['fee'];
// }
?>

32
<div id="content">
<div class="content_item">
<h1>Welcome <?php echo
$_SESSION['username'];?></h1>
<form action="accept.php" method="post">
<div class="content_container">
<h3>Admission Details</h3>
<p>Registered Students : <?php echo
mysql_num_rows($result);?></p>
<p>Admitted Students : <?php echo
mysql_num_rows($resultz);?></p>

<button type="button" class="btn btn-success btn-xs"


data-toggle="modal" data-
target="#myModal">Accept</button>

<div class="table-responsive">
<table id="student" width="100%"
class="table table-hover table-striped">
<thead>
<tr>
<th>SN</th>
<th>Full Name</th>

33
<th>UoA Reg.</th>
<th>Exam</th>
<th>Option</th>
</tr>
</thead>
<tbody>
<?php
$query = "SELECT *
FROM students";
$student_set = mysql_query($query,
$connection);
confirm_query($student_set);

while ($student =
mysql_fetch_array($student_set)) {
$lc = getlocal($student['local']);

$lcname = $lc['local_name'];

$sn =
getstate($student['state_id']);

34
$sname = $sn['name'];
?>
<tr>
<td><?php echo
$student['id']; ?></td>
<td><?php echo
$student['surname']." ".$student['name']; ?></td>
<td><?php echo
$student['UoAbreg']; ?></td>
<td><?php echo
ucwords($student['exam']); ?></td>
<td>
<?php
$sid = $student['id'];
echo
($student['admission_status'] == 1) ? '<b>offered</b>' :
'<input type="checkbox" name="selector[]" value="$sid">';
?>

</td>
</tr>
<?php
}

35
?>
</tbody>
</table>
</div>
</div><!--close content_container-->
<?php include 'modal.php'; ?>
</form>
</div><!--close content_item-->
</div><!--close content-->
</div><!--close site_content-->

<?php require ("footer_admin.php");?>

36
SIGN IN
<?php require_once ("includes/session.php");?>
<?php include 'includes/header.php';?>
<?php
if (isset($_SESSION['user_id'])) {
redirect_to("student.php?
sid={$_SESSION['user_id']}");
}
?>
<?php
if (isset($_POST['user_login'])) {
$errors = array();

$required_field = array('username', 'password');


foreach ($required_field as $filedname) {
if (!isset($_POST[$filedname]) ||
empty($_POST[$filedname])) {
$errors[] = $filedname;
}
}

37
$field_with_length = array('username' => 30, 'password'
=> 30);
foreach ($field_with_length as $filedname =>
$max_length) {
if (strlen(trim(mysql_prep($_POST[$filedname]))) >
$max_length) {
$errors[] = $filedname;
}
}

$username = mysql_prep($_POST['username']);
$password = mysql_prep($_POST['password']);

if(empty($errors)) {
$query = "SELECT id, UoA,surname ";
$query .= "FROM students ";
$query .= "WHERE UoAreg = '{$username}' ";
$query .= "AND surname = '{$password}' ";
$query .= "LIMIT 1";
$result = mysql_query($query, $connection);
confirm_query($result);
if (mysql_num_rows($result) == 1) {

38
//user authebticated
$found_user = mysql_fetch_array($result);
$_SESSION['user_id'] = $found_user['id'];
$_SESSION['username'] = $found_user['surname'];
redirect_to("student.php?sid={$found_user['id']}");
} else {
$message = "The username/password is incorrect.";
}
} else {
//nothing
}

} else {
if (isset($_GET['logout']) && $_GET['logout'] == 1) {
$message = "You are now logged out. Please Sign in
to Continue";
}
if (isset($_GET['login']) && $_GET['login'] == 1) {
$message = "Sucessfully Registered Sign in to
Continue";
}
$username = "";
39
$password = "";
$c_password= "";
}

?>
<div id="content">
<div class="content_item">
<h2>Welcome</h2>
<p class="selected">Log In to Continue :</p>
<?php if (!empty($message)) { echo "<p class=\"alert
alert-success\">{$message}</p>"; } ?>
<?php if (!empty($errors)) { echo "<p class=\"alert
alert-danger\">Please review the following field : <br />";
foreach ($errors as $error) {echo "-
{$error}<br />"; } echo "</p>";} ?>
<form action="" method="POST">
<div style="width:120px; float:left;"><p> UoA
Reg. Number</p></div>
<div style="width:430px; float:right;"><p><input
class="contact form-control" type="text" name="username"
value="" /></p></div>
<br style="clear:both;" />

40
<div style="width:120px;
float:left;"><p>Surname</p></div>
<div style="width:430px; float:right;"><p><input
class="contact form-control" type="password"
name="password" value="" /></p></div>
<br style="clear:both;" />
<div style="width:430px; float:right;"><p
style="padding-top: 15px"><input class="submit btn btn-md
btn-primary" type="submit" name="user_login" value=" Log
In " /></p></div>
</form>
<br style="clear:both;" />
</div><!--close content_item-->
</div><!--close content-->
</div><!--close site_content-->
<?php include 'includes/footer.php';?>

41
SCREENSHOTS
HOME PAGE

42
LOGIN PAGE

43
REGISTRATION FORM

44
ADMINISTRATOR PAGE

45
ADMIN STUDENT PANEL

46
CONTACT US

47
11. BIBLIOGRAPHY.
 PHP Manual www.php.net.
 PHP Manual-
www.w3school.com.
 www.google.com
 Introduction to Database
System
 Database Structured
Techniques
 Database Management
System .
 www.phptpoint.com
 www.udemy.com
 www.scribd.com

48

You might also like