0% found this document useful (0 votes)
95 views43 pages

Mid-Western University Faculty of Engineering Central Campus of Engineering

This document presents a project report on a Hostel Management System for Mid-Western University. The system aims to manage various activities in hostels more efficiently by automating processes like student registration, hostel allocation, mess calculation, and complaint registration. It identifies drawbacks of the existing manual system like high human effort, low security, data redundancy and proposes a computerized system that is more user-friendly and overcomes these limitations. The report includes chapters on feasibility analysis, requirement analysis, system design, implementation, testing, and conclusions.

Uploaded by

khagendra dahal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views43 pages

Mid-Western University Faculty of Engineering Central Campus of Engineering

This document presents a project report on a Hostel Management System for Mid-Western University. The system aims to manage various activities in hostels more efficiently by automating processes like student registration, hostel allocation, mess calculation, and complaint registration. It identifies drawbacks of the existing manual system like high human effort, low security, data redundancy and proposes a computerized system that is more user-friendly and overcomes these limitations. The report includes chapters on feasibility analysis, requirement analysis, system design, implementation, testing, and conclusions.

Uploaded by

khagendra dahal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 43

MID-WESTERN UNIVERSITY

FACULTY OF ENGINEERING
CENTRAL CAMPUS OF ENGINEERING

[Subject Code: CO510]


PROJECT REPORT
ON
HOSTEL MANAGEMENT SYSTEM
Submitted by:
Bharat Dahal [71040436]
Lokendra Dhital [71040442]
Sagar Aryal [71040446]
Samikshya B.C [71040447]
Sanjay kumar Sah [71040448]
Surendra [71040450]
Budhathoki

Submitted To:
Er. Samya Deo Yadav
Date:2076/09/09

i
ACKNOWLEDGEMENT

We gladly present this project report on “HOSTEL MANAGEMENT SYSTEM”


as part of the 4th semester Computer Engineering. At this time of submitting this
report we use this opportunity to mention those people who with us along the
work. We take this occasion to thank God, almighty for blessing us with his grace
and taking our endeavor to a successful culmination. We extend our sincere and
heartfelt thanks to our esteemed. for providing us with the right guidance and
advice at the crucial junctures and for showing us the right way. We extend our
sincere thanks to our respected Head of the Department Er. Samya deo Yadav for
allowing us to use the facilities available. We would like to thank the other faculty
members also, at this occasion. Last but not the least; we would like to thank
friends for the support and encouragement they have given us during the Course
of our work.

i
ABSTRACT
“HOSTEL MANAGEMENT SYSTEM” is software developed for managing
various activities in the hostel. For the past few years the number of educational
institutions is increasing rapidly. Thereby the number of hostels is also increasing
for the accommodation of the students studying in this institution. And hence
there is a lot of strain on the person who are running the hostel and software’s are
not usually used in this context. This particular project deals with the problems on
managing a hostel and avoids the problems which occur when carried manually.
Identification of the drawbacks of the existing system leads to the designing of
computerized system that will be compatible to the existing system with the
system which is more user friendly and more GUI oriented. We can improve the
efficiency of the system, thus overcome the drawbacks of the existing system

i
Table of Contents
ACKNOWLEDGEMENT........................................................................................................................I
ABSTRACT...............................................................................................................................................II
LIST OF TABLE........................................................................................................................................V
LIST OF FIGURES.....................................................................................................................................1
CHAPTER 1: INTRODUCTION:..............................................................................................................2
1.1 project overview :.................................................................................................................2
1.2 project objectives :.................................................................................................................2
CHAPTER 2 : LITERATURE REVIEW....................................................................................................3
2.1 existing system:......................................................................................................................3
2.2 disadvantages:........................................................................................................................3
2.3 proposed sysytem :................................................................................................................3
CHAPTER 3:FEASIBILITY STUDY.........................................................................................................4
3.1technical feasibility.................................................................................................................4
3.2 economical feasibility :..........................................................................................................4
3.3 operational feasibility :...........................................................................................................4
CHAPTER 4 : REQUIREMENT ANALYSIS............................................................................................5
4.1administrator module:.............................................................................................................5
4.2hardware configuration :.........................................................................................................5
4.3 software configuration:..........................................................................................................5
CHAPTER 5 :SYSTEM DESIGN :............................................................................................................6
5.1 administrator..........................................................................................................................6
5.2dataflow diagram:...................................................................................................................6
5.2 er diagram..............................................................................................................................7
5.3database design (table structure).............................................................................................8
CHAPTER 6: SYSTEM IMPLEMENTATION AND TESTING...............................................................9
6.1 system implementation :........................................................................................................9
6.2 system testing :.......................................................................................................................9
6.3unit testing :............................................................................................................................9
6.4user acceptance testing :..........................................................................................................9
CHAPTER 7:CONCLUSION:..................................................................................................................10
CHAPTER8:REFERENCE :.....................................................................................................................11

i
CHAPTER9:APPENDIX :........................................................................................................................12
9.1 source code:.........................................................................................................................................12
9.2 sample screenshot....................................................................................................................34

i
LIST OF TABLE
Database table of registration ………………………………………………….8

i
LIST OF FIGURES

5.2 Dataflow diagram…………………………………………………………..6


5.3 Er diagram………….……………………………………………………….9

CHAPTER 1: INTRODUCTION

i
1.1 PROJECT OVERVIEW :
The hostel management system is web based software to provide college
students accommodation to the university hostel more efficiently. This project
also keeps details of the hostellers and applied students. It is headed by Warden.
He will be the administrator. For accommodate a large number of students into
hostel. This document is intended to minimize human works and make hostel
allocation is an easier job for cusat students and hostel authorities by providing
online application for hostel, automatically select the students from the waiting list
and mess calculation, complaint registration, notice board etc. etc. Students will
get approval notification in their mails. Hostellers can view notice board, hostel
fee, mess menu by login into the online system.

1.2 PROJECT OBJECTIVES :


 Maintain the students as hostellers and waiting list students separately
 Process allotment list.
 Admin can send the approval notification to every approved student via
email .
 Automatically insert student’s details to the hosteller’s record when the
allotment is confirmed by the admin and deleted when vacation is
conformed or after the course end date.
 Students can register their complaints.
 Admin can edit notice board and each student can view it.
 Hostel secretary can calculate hostel fee including mess fee and can edit
mess menu

i
CHAPTER 2 : LITERATURE REVIEW

2.1 EXISTING SYSTEM:


The existing system is manual based and need lot of efforts and consume enough
time. In the existing system we can apply for the hostels online but the allotment
processes are done manually. It may lead to corruptions in the allocation process
as well as hostel fee calculation. The existing system does not deals with mess
calculation and complaint registration.

2.2 DISADVANTAGES:
 More human power
 More strength and strain of manual labor needed
 Repetition of same procedure.
 Low security.
 Data redundancy.
 Difficulty to handle.
 Difficulty to update data.
 Record keeping is difficult.
 Backup data can be easily generated.

2.3 PROPOSED SYSYTEM :


The proposed system is having many advantages over the existing system. It
require less overhead and very efficient. The proposed system deals with the mess
calculation and allotment process efficient.This system will provide full
information about information about a student in the hostel. there will be an
administrator module which accessed by the administrator and has the ability to
deleted add and edit employee records. This system will be based on software
development life cycle (SDLC) with PHP and My SQL server. PHP is good for
the development and design of webbased programs while My SQL is good for
databases because of its security and its advanced features and properties

i
CHAPTER 3: FEASIBILITY STUDY

3.1TECHNICAL FEASIBILITY :
The technical feasibility in the proposed system deals with the technology used in
the system. It deals with the hardware and software used in the system whether
they are of latest technology or not. It happens that after a system is prepared a
new technology arises and the user wants the system based on that technology.
This system use windows platform, .net as front end technology and sql server as
backend technology. Thus hostel management system is technically feasible.

3.2 ECONOMICAL FEASIBILITY :


Economic analysis is the most frequently used method for evaluating the
effectiveness of a new system. More commonly known as cost/benefit analysis.
Php and sql database easily available in internet

3.3 OPERATIONAL FEASIBILITY:


The project has been developed in such a way that it becomes very easy even for a
person with little computer knowledge to operate it. This software is very user
friendly and does not require any technical person to operate. Thus, the project is
even operationally feasible.

i
CHAPTER 4 : REQUIREMENT ANALYSIS

4.1ADMINISTRATOR MODULE:
In administrator module administrator manages the master data’s like server
details and student details. Accept the application of students, view the application
forms, reject the fake applications, view the complaints of the students in the
hostel, accept the vacating form and delete from the database, edit the notice
boards and view complaints.

4.2HARDWARE CONFIGURATION :
The section of hardware configuration is an important task related to the software
development insufficient random access memory may affect adversely on the
speed and efficiency of the entire system. The process should be powerful to
handle the entire operations. The hard disk should have sufficient capacity to store
the file and application.
RAM:512(minimum)
Processor:Pentium IV or above
Hard disk:1GB

4.3 SOFTWARE CONFIGURATION:


A major element in building a system is the section of compatible software since
the software in the market is experiencing in geometric progression. Selected
software should be acceptable by the firm and one user as well as it should be
feasible for the system. This document gives a detailed description of the software
requirement specification. The study of requirement specification is focused
specially on the functioning of the system. It allow the developer or analyst to
understand the system, function to be carried out the performance level to be
obtained and corresponding interfaces to be established.
Operating system : Window 7/8/10,Linux
Web Browser: Opera, Chrome or Any
XAMP
Text editor : Notepad+, Sublime or Any
Backend: Myql, Php

i
CHAPTER 5: SYSTEM DESIGN

5.1 ADMINISTRATOR :
The Administrator can allot different students to the different hostels.
He can vacate the students for the hostels.
He can control the status of the fee payment.
He can edit the details of the students. He can change their rooms, edit and delete the
student records.
He can edit the news board
He can check the complaints

5.2DATAFLOW DIAGRAM:

i
5.2 ER DIAGRAM

i
Fig:Er diagram of hostel management system

5.3DATABASE DESIGN (TABLE STRUCTURE)

NAME TYPE

i
NAME VARCHAR
GENDER VARCHAR
DOB DATE
ADDRESS NCHAR
PINCODE INT
DISTRICT VARCHAR
LANDLINE NUMBER INT
MOBILE NUMBER INT
NAME &ADDRESS OF NCHAR
PARENT OR GUARDIAN
PARENT’S PHONE NUMBER INT
EMAIL ID NCHAR
RELIGION VARCHAR
CAST VARCHAR
DISTANCE IN KILOMETER FLOAT
COMMUNAL RESERVATION CHAR
PHYSICALLY CHAR
HANDICAPPED
FOREIGN STUDENT CHAR
COURSE OF STUDY CHAR
NATURE OF STUDY NCHAR
DEPARTMENT NCHAR
DATE OF ADMISSION TO DATE
COURSE
EXPECTED DATE OF DATE
COMPLETION OF COURSE
DATE FROM ADMISSION DATE
REQUIRES

CHAPTER 6: SYSTEM IMPLEMENTATION AND


TESTING

i
6.1 SYSTEM IMPLEMENTATION :
Implementation is the stage in the project where the theoretical design is turned
into a working system and is giving confidence on the new system for the users
that it will work efficiently and effectively. It involves careful planning,
investigation of the current system and its constraints on implementation, design
of methods to achieve the change over, an evaluation of change over methods.
Apart from planning major task of preparing the implementation are education
and training of users. The implementation process begins with preparing a plan for
the implementation of the system. According to this plan, the activities are to be
carried out, discussions made regarding the equipment and resources and the
additional equipment has to be acquired to implement the new system. In network
backup system no additional resources are needed. Implementation is the final and
the most important phase. The most critical stage in achieving a successful new
system is giving the users confidence that the new system will work and be
effective. The system can be implemented only after thorough testing is done and
if it is found to be working according to the specification.

6.2 SYSTEM TESTING :


As the part of system testing we execute the program with the intent of finding
errors and missing operations and also a complete verification to determine
whether the objectives are met and the user requirements are satisfied. The
ultimate aim is quality assurance. Tests are carried out and the results are
compared with the expected document. In the case of erroneous results, debugging
is done. Using detailed testing strategies a test plan is carried out on each module.
The various tests performed are unit testing, integration testing and user
acceptance testing.

6.3UNIT TESTING :
The software units in the system is are modules and routines that are assembled
and integrated to perform a specific function. As a part of unit testing we executed
the program for individual modules independently. This enables, to detect errors
in coding and logic that are contained within each of the three module. This
testing includes entering data that is filling forms and ascertaining if the value
matches to the type and entered into the database. The various controls are tested
to ensure that each performs its action as required.

6.4USER ACCEPTANCE TESTING :


User acceptance of a system is the key factor for the success of any system. The
system under consideration is tested for user acceptance by constantly keep the

i
records of applicants and making changes to the details and password whenever
required.

CHAPTER7 : CONCLUSION

i
To conclude the description about the project The project, developed using Php
with SQL SERVER is based on the requirement specification of the user and the
analysis of the existing system, with flexibility for future enhancement. HOSTEL
MANAGEMENT SYSTEM is very useful for hostel allotment and mess fee
calculation . This hostel management software is designed for people who want to
manage various activities in the hostel. For the past few years the numbers of
educational institutions are increasing rapidly. Thereby the numbers of hostels are
also increasing for the accommodation of the students studying in this institution.
And hence there is a lot of strain on the person who are running the hostel and
software’s are not usually used in this context. This particular project deals with
the problems on managing a hostel and avoids the problems which occur when
carried manually. Identification of the drawbacks of the existing system leads to
the designing of computerized system that will be compatible to the existing
system with the system which is more user friendly and more GUI oriented.

CHAPTER8: REFERENCE

1.James R Groff and Paul N Weinberg, “Complete reference Second Edition”


2.Css files, from W3 schools. http//w3 school.com/css_file
3.Hostel form, from cusat hostel.

i
4.Css files, from Wikipedia, the free encyclopedia

CHAPTER9: APPENDIX
9.1 SOURCE CODE:
1.Admin module- allotment process:

<?php

session_start();

include('includes/config.php');

i
include('includes/checklogin.php');

check_login();

?>

<!doctype html>

<html lang="en" class="no-js">

<head>

<meta charset="UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-


scale=1, maximum-scale=1">

<meta name="description" content="">

<meta name="author" content="">

<meta name="theme-color" content="#3e454c">

<title>Access Log</title>

<link rel="stylesheet" href="css/font-awesome.min.css">

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-social.css">

<link rel="stylesheet" href="css/bootstrap-select.css">

<link rel="stylesheet" href="css/fileinput.min.css">

<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">

<link rel="stylesheet" href="css/style.css">

</head>

<body>

<?php include('includes/header.php');?>

i
<div class="ts-main-content">

<?php include('includes/sidebar.php');?>

<div class="content-wrapper">

<div class="container-fluid">

<div class="row">

<div class="col-md-12">

<h2 class="page-title">Access Log</h2>

<div class="panel panel-default">

<div class="panel-heading">All Courses


Details</div>

<div class="panel-body">

<table id="zctb" class="display table


table-striped table-bordered table-hover" cellspacing="0" width="100%">

<thead>

<tr>

<th>Sno.</th>

<th>User
Id</th>

<th>User
Email</th>

<th>IP</th>

<th>City</th>

<th>Country</th>

<th>Login
Time</th>

</tr>

</thead>

i
<tfoot>

<tr>

<th>Sno.</th>

<th>User
Id</th>

<th>User
Email</th>

<th>IP</th>

<th>City</th>

<th>Country</th>

<th>Login
Time</th>

</tr>

</tfoot>

<tbody>

<?php

$aid=$_SESSION['id'];

$ret="select * from userlog";

$stmt= $mysqli->prepare($ret) ;

//$stmt->bind_param('i',$aid);

$stmt->execute() ;

$res=$stmt->get_result();

$cnt=1;

while($row=$res->fetch_object())

?>

<tr><td><?php echo $cnt;;?></td>

i
<td><?php echo $row->userId;?></td>

<td><?php echo $row->userEmail;?></td>

<td><?php echo $row->userIp;?></td>

<td><?php echo $row->city;?></td>

<td><?php echo $row->country;?></td>

<td><?php echo $row->loginTime;?></td>

</tr>

<?php

$cnt=$cnt+1;

} ?>

</tbody>

</table>

</div>

</div>

</div>

</div>

</div>

</div>

i
</div>

<!-- Loading Scripts -->

<script src="js/jquery.min.js"></script>

<script src="js/bootstrap-select.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/jquery.dataTables.min.js"></script>

<script src="js/dataTables.bootstrap.min.js"></script>

<script src="js/Chart.min.js"></script>

<script src="js/fileinput.js"></script>

<script src="js/chartData.js"></script>

<script src="js/main.js"></script>

</body>

</html>

i
DASHBOARD

<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();

?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1,
minimum-scale=1, maximum-scale=1">
<meta name="description" content="">

i
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>DashBoard</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">

</head>

<body>
<?php include("includes/header.php");?>

<div class="ts-main-content">
<?php include("includes/sidebar.php");?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Dashboard</h2>

<div class="row">
<div class="col-md-12">
<div class="row">

i
<div class="col-
md-3">
<div
class="panel panel-default">

<div class="panel-body bk-primary text-light">

<div class="stat-panel text-center">

<?php
$result ="SELECT count(*) FROM registration ";
$stmt = $mysqli->prepare($result);
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
$stmt->close();
?>

<div class="stat-panel-number h1 "><?php echo $count;?></div>

<div class="stat-panel-title text-uppercase"> Students</div>

</div>

</div>

<a href="manage-students.php" class="block-anchor panel-footer">Full Detail <i


class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-
md-3">
<div
class="panel panel-default">

<div class="panel-body bk-success text-light">

i
<div class="stat-panel text-center">
<?php
$result1 ="SELECT count(*) FROM rooms ";
$stmt1 = $mysqli->prepare($result1);
$stmt1->execute();
$stmt1->bind_result($count1);
$stmt1->fetch();
$stmt1->close();
?>

<div class="stat-panel-number h1 "><?php echo $count1;?></div>

<div class="stat-panel-title text-uppercase">Total Rooms </div>

</div>

</div>

<a href="manage-rooms.php" class="block-anchor panel-footer text-center">See


All &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-
md-3">
<div
class="panel panel-default">

<div class="panel-body bk-info text-light">

<div class="stat-panel text-center">


<?php
$result2 ="SELECT count(*) FROM courses ";
$stmt2 = $mysqli->prepare($result2);
$stmt2->execute();
$stmt2->bind_result($count2);

i
$stmt2->fetch();
$stmt2->close();
?>

<div class="stat-panel-number h1 "><?php echo $count2;?></div>

<div class="stat-panel-title text-uppercase">Total Courses</div>

</div>

</div>

<a href="manage-courses.php" class="block-anchor panel-footer text-


center">See All &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>

</div>
</div>
</div>
</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>

i
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

<script>

window.onload = function(){

// Line chart from swirlData for dashReport


var ctx = document.getElementById("dashReport").getContext("2d");
window.myLine = new Chart(ctx).Line(swirlData, {
responsive: true,
scaleShowVerticalLines: false,
scaleBeginAtZero : true,
multiTooltipTemplate: "<%if (label){%><%=label%>: <%}%><
%= value %>",
});

// Pie Chart from doughutData


var doctx = document.getElementById("chart-area3").getContext("2d");
window.myDoughnut = new Chart(doctx).Pie(doughnutData,
{responsive : true});

// Dougnut Chart from doughnutData


var doctx = document.getElementById("chart-area4").getContext("2d");
window.myDoughnut = new Chart(doctx).Doughnut(doughnutData,
{responsive : true});

}
</script>

</body>

i
<div class="foot"><footer>
<
</footer> </div>

<style> .foot{text-align: center; border: 1px solid black;}</style>

</html>

Dashboard;

<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();
//code for registration
if($_POST['submit'])
{
$roomno=$_POST['room'];
$seater=$_POST['seater'];
$feespm=$_POST['fpm'];
$foodstatus=$_POST['foodstatus'];
$stayfrom=$_POST['stayf'];
$duration=$_POST['duration'];
$course=$_POST['course'];
$regno=$_POST['regno'];
$fname=$_POST['fname'];
$mname=$_POST['mname'];
$lname=$_POST['lname'];
$gender=$_POST['gender'];
$contactno=$_POST['contact'];
$emailid=$_POST['email'];
$emcntno=$_POST['econtact'];
$gurname=$_POST['gname'];
$gurrelation=$_POST['grelation'];
$gurcntno=$_POST['gcontact'];
$caddress=$_POST['address'];
$ccity=$_POST['city'];

i
$cstate=$_POST['state'];
$cpincode=$_POST['pincode'];
$paddress=$_POST['paddress'];
$pcity=$_POST['pcity'];
$pstate=$_POST['pstate'];
$ppincode=$_POST['ppincode'];
$query="insert into
registration(roomno,seater,feespm,foodstatus,stayfrom,duration,course,regno,first
Name,middleName,lastName,gender,contactno,emailid,egycontactno,guardianNa
me,guardianRelation,guardianContactno,corresAddress,corresCIty,corresState,cor
resPincode,pmntAddress,pmntCity,pmnatetState,pmntPincode)
values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
$stmt = $mysqli->prepare($query);
$rc=$stmt->bind_param('iiiisisissssisississsisssi',$roomno,$seater,$feespm,
$foodstatus,$stayfrom,$duration,$course,$regno,$fname,$mname,$lname,
$gender,$contactno,$emailid,$emcntno,$gurname,$gurrelation,$gurcntno,
$caddress,$ccity,$cstate,$cpincode,$paddress,$pcity,$pstate,$ppincode);
$stmt->execute();
$stmt->close();

$query1="insert into
userregistration(regNo,firstName,middleName,lastName,gender,contactNo,email,
password) values(?,?,?,?,?,?,?,?)";
$stmt1= $mysqli->prepare($query1);
$stmt1->bind_param('sssssiss',$regno,$fname,$mname,$lname,$gender,
$contactno,$emailid,$contactno);
$stmt1->execute();
echo"<script>alert('Student Succssfully register');</script>";
}
?>

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1,
minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>Student Hostel Registration</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">>
<link rel="stylesheet" href="css/bootstrap-social.css">

i
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.11.3-jquery.min.js"></script>
<script type="text/javascript" src="js/validation.min.js"></script>
<script type="text/javascript"
src="http://code.jquery.com/jquery.min.js"></script>
<script>
function getSeater(val) {
$.ajax({
type: "POST",
url: "get_seater.php",
data:'roomid='+val,
success: function(data){
//alert(data);
$('#seater').val(data);
}
});

$.ajax({
type: "POST",
url: "get_seater.php",
data:'rid='+val,
success: function(data){
//alert(data);
$('#fpm').val(data);
}
});
}
</script>

</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/sidebar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Registration
</h2>

<div class="row">

i
<div class="col-md-12">
<div class="panel
panel-primary">
<div
class="panel-heading">Fill all Info</div>
<div
class="panel-body">
<form
method="post" action="" class="form-horizontal">

<div class="form-group">
<label class="col-sm-4 control-label"><h4 style="color: green"
align="left">Room Related info </h4> </label>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Room no. </label>
<div class="col-sm-8">
<select name="room" id="room"class="form-control"
onChange="getSeater(this.value);" onBlur="checkAvailability()" required>
<option value="">Select Room</option>
<?php $query ="SELECT * FROM rooms";
$stmt2 = $mysqli->prepare($query);
$stmt2->execute();
$res=$stmt2->get_result();
while($row=$res->fetch_object())
{
?>
<option value="<?php echo $row->room_no;?>"> <?php echo $row->room_no;?
></option>
<?php } ?>
</select>
<span id="room-availability-status" style="font-size:12px;"></span>

</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Seater</label>
<div class="col-sm-8">
<input type="text" name="seater" id="seater" class="form-control" >
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Fees Per Month</label>
<div class="col-sm-8">

i
<input type="text" name="fpm" id="fpm" class="form-control" >
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Food Status</label>
<div class="col-sm-8">
<input type="radio" value="0" name="foodstatus" checked="checked"> Without
Food
<input type="radio" value="1" name="foodstatus"> With Food(Rs 2000.00 Per
Month Extra)
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Stay From</label>
<div class="col-sm-8">
<input type="date" name="stayf" id="stayf" class="form-control" >
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Duration</label>
<div class="col-sm-8">
<select name="duration" id="duration" class="form-control">
<option value="">Select Duration in Month</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label"><h4 style="color: green"
align="left">Personal info </h4> </label>
</div>

i
<div class="form-group">
<label class="col-sm-2 control-label">course </label>
<div class="col-sm-8">
<select name="course" id="course" class="form-control" required>
<option value="">Select Course</option>
<?php $query ="SELECT * FROM courses";
$stmt2 = $mysqli->prepare($query);
$stmt2->execute();
$res=$stmt2->get_result();
while($row=$res->fetch_object())
{
?>
<option value="<?php echo $row->course_fn;?>"><?php echo $row->course_fn;?
>&nbsp;&nbsp;(<?php echo $row->course_sn;?>)</option>
<?php } ?>
</select> </div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Registration No : </label>
<div class="col-sm-8">
<input type="text" name="regno" id="regno" class="form-control"
required="required" >
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">First Name : </label>
<div class="col-sm-8">
<input type="text" name="fname" id="fname" class="form-control"
required="required" >
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Middle Name : </label>
<div class="col-sm-8">
<input type="text" name="mname" id="mname" class="form-control">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Last Name : </label>
<div class="col-sm-8">

i
<input type="text" name="lname" id="lname" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Gender : </label>
<div class="col-sm-8">
<select name="gender" class="form-control" required="required">
<option value="">Select Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="others">Others</option>
</select>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Contact No : </label>
<div class="col-sm-8">
<input type="text" name="contact" id="contact" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Email id : </label>
<div class="col-sm-8">
<input type="email" name="email" id="email" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Emergency Contact: </label>
<div class="col-sm-8">
<input type="text" name="econtact" id="econtact" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Guardian Name : </label>
<div class="col-sm-8">
<input type="text" name="gname" id="gname" class="form-control"
required="required">

i
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Guardian Relation : </label>
<div class="col-sm-8">
<input type="text" name="grelation" id="grelation" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Guardian Contact no : </label>
<div class="col-sm-8">
<input type="text" name="gcontact" id="gcontact" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-3 control-label"><h4 style="color: green"
align="left">Correspondense Address </h4> </label>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Address : </label>
<div class="col-sm-8">
<textarea rows="5" name="address" id="address" class="form-control"
required="required"></textarea>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">City : </label>
<div class="col-sm-8">
<input type="text" name="city" id="city" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">State </label>
<div class="col-sm-8">
<select name="state" id="state"class="form-control" required>
<option value="">Select State</option>
<?php $query ="SELECT * FROM states";

i
$stmt2 = $mysqli->prepare($query);
$stmt2->execute();
$res=$stmt2->get_result();
while($row=$res->fetch_object())
{
?>
<option value="<?php echo $row->State;?>"><?php echo $row->State;?
></option>
<?php } ?>
</select> </div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Pincode : </label>
<div class="col-sm-8">
<input type="text" name="pincode" id="pincode" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-3 control-label"><h4 style="color: green"
align="left">Permanent Address </h4> </label>
</div>

<div class="form-group">
<label class="col-sm-5 control-label">Permanent Address same as
Correspondense address : </label>
<div class="col-sm-4">
<input type="checkbox" name="adcheck" value="1"/>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Address : </label>
<div class="col-sm-8">
<textarea rows="5" name="paddress" id="paddress" class="form-control"
required="required"></textarea>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">City : </label>
<div class="col-sm-8">

i
<input type="text" name="pcity" id="pcity" class="form-control"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">State </label>
<div class="col-sm-8">
<select name="pstate" id="pstate"class="form-control" required>
<option value="">Select State</option>
<?php $query ="SELECT * FROM states";
$stmt2 = $mysqli->prepare($query);
$stmt2->execute();
$res=$stmt2->get_result();
while($row=$res->fetch_object())
{
?>
<option value="<?php echo $row->State;?>"><?php echo $row->State;?
></option>
<?php } ?>
</select> </div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Pincode : </label>
<div class="col-sm-8">
<input type="text" name="ppincode" id="ppincode" class="form-control"
required="required">
</div>
</div>

<div class="col-sm-6 col-sm-offset-4">


<button class="btn btn-default" type="submit">Cancel</button>
<input type="submit" name="submit" Value="Register" class="btn btn-primary">
</div>
</form>

</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

i
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
<script type="text/javascript">
$(document).ready(function(){
$('input[type="checkbox"]').click(function(){
if($(this).prop("checked") == true){
$('#paddress').val( $('#address').val() );
$('#pcity').val( $('#city').val() );
$('#pstate').val( $('#state').val() );
$('#ppincode').val( $('#pincode').val() );
}

});
});
</script>
<script>
function checkAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'roomno='+$("#room").val(),
type: "POST",
success:function(data){
$("#room-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
</script>

</html>

i
9.2 SAMPLE SCREENSHOT

i
i

You might also like