Sie sind auf Seite 1von 41

Automated Elective Registration And Management System

Chapter-1

INTRODUCTION
1.1 Purpose:
The purpose of the proposed system is to help the students to register the electives online . It also
helps the student to know the about their internals marks and attendance as and when required .It
will also help the

students to know the details about each elective being offered by the

department. The proposed system will minimize the burden of students of searching for
attendance and marks of each subject by performing those tasks in an efficient and simplified
way.

1.2 Scope:
This system has its scope with every student in the college as everyone of them needs to register
for the electives by knowing the details about the electives .The student wants to know about his
attendance and internals marks. This system provides advanced way to register electives and
stores details of the students who have registered and also maintain academic details of students.
This portal can be used by every student and lecture of the college making ease for them.

1.3 Motivation:
These days everything is stored in databases. But the departments of the college still make use of
traditional way of registering the electives by sending google forms to email ids of students. To
get the advantages of technology we are creating automated elective registration system which
helps students to know about marks and attendance of electives in an automated way. Also there
are many ways to maintain database in an effective and efficient manner.

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

1.4

Literature Survey:

In every college students of higher semester have to register for the electives whether they may
be global elective or departmental elective. The lecturers have to give orientation about each
elective the department is offering and also they discuss about the syllabus of the elective and
reference books, this is the traditional practice in most of the engineering colleges. Even our
college has this practice since the college was established. Every student has to register for the
electives each student has been given a list of electives in two categories and the students have to
choose one elective from each category. The student can register to elective by providing the usn.
The registration email will be sent to and every student by the hod. In case of global electives, if
the student wants to know about attendance or marks .the student has to go to that particular
department. The information pertaining to each and every student is recorded by the teaching
staff.
From the beginning of the college to till date, such elective registration is done in
traditional way by sending google forms. If a student wants to know about a particular elective, it
will not available to him,the student has to search for it. To overcome all these issues we can go
for developing a database management system for electives. The proposed system aims to
provide a new service known as Automated Elective Registration And Management System, so
that students can register electives and know attendance and marks through database which is
advanced.

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

SOFTWARE REQUIREMENT SPECIFICATIONS


2.1 Overall Description
The proposed system has been designed to help the students to register electives in an automated
way. It also helps the lecturers to create and update the student details. The data of the student is
secured at every instance of time . The student can also view the permitted information and will
not have any authority to change or modify the information.

2.2 Specific Requirements


The requirements of the Automated elective registration and management system are:
A web based front end for elective registration by entering student details including the
Name, USN, phone number, elective, assignment topic, email id etc.
A web based front end for searching the information relating to a given marks,attendance.
GUI for update and retrieve details of student.

2.2.1 Functionality
The two main user groups and access levels are:
Student (normal access level)
Staff (privileged access level)
Admin (privileged access level)
Therefore, the requirements could be efficiently analyzed depending on the user group and the
functionalities they should be allowed to perform.

2.2.1.1 Functionality:
The main user groups are:

Admin login

Faculty login

Students login

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

Functionality of Admin:

Admin can add /remove departments.

Add faculties of each department.

Automated deletion of courses with less than 10 students.

Plot a graph for strength of student in each elective.

Automated Finalization.

Functionality of admin Staff:

Add / delete electives for students to elect.

Add / delete students.

Add or change elective info, orientation video.

Display list of students opted for an elective.

Upload marks, attendance to display students with NSSR and NSAR.

Finalize Marks.

Upload assignments with time deadline.

Functionality of admin Student:

A student should register to opt an elective, username and password is given for every
student.

Select / Change an elective and alternative of option.

Check the details of course like credit, faculty and syllabus.

Submit assignments.

Finalize Marks.

Functionality of User

The counsellor is the administrator of the database .

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

Each counsellor has his separate account to keep track of his mentees data separated by a

user name and password.


Every counsellor possesses a unique user name and a password after registration.
Counsellors can create new student record and update already existing student details
with ease.

2.2.1.2 Security Requirements


It is of utmost importance to ensure that there is restriction on who can access the database. staff
must provide a unique email id and his password and can access their system. Each lecture has
password with which he can edit or delete his account. And also student has to provide a unique
email id and his password and can access his/her details. Each student has its password with
which he can edit or delete his account.

2.2.2 Performance Requirement


The PCs used must be at least Pentium 4 machines so that they can give optimum performance of
the product.
In addition to these requirements, the system should also embrace the following requirements:Reliability: The system should have little or no downtime and be able to handle multiple
concurrent users.
Ease of Use: The general and administrative views should be easy to use and intuitive. Online
help and documentation should be provided.
System and Browser compatibility Testing: The system should be accessible on the following
browsers - Microsoft Internet Explorer 9.0+, Google Chrome and Mozilla 3.6+.

2.2.3 Design Constraints


The designers must design the database is such a way that any change in the information of a
student should be updated and saved effectively in the database despite the fact that multiple
counsellors access the database.

2.2.4 Hardware Requirement


Users Side:

Operating System: Windows xp ,Windows Vista, Windows 7,Windows 8.

Processor: Pentium 3.0 or higher

RAM: 256 Mb or more

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

Hard Drive: 10 GB or more

2.2.5 Software Requirement

Front End : PHP(Personal Home Page)

Back End : Microsoft SQL server studio 2005

Operating System : Microsoft Windows XP

2.2.6 Interfaces
Two Types of interfaces are generally provided in this Project. Counsellors are authorized to
create, update and view student details and Student only to view the information.

2.2.6.1 User Interfaces


The database designed should be very easy to use and user friendly.

Student can check his details like attendance and marks.


Only the lecture can upload the details of student.
The administrator can add electives elective syllabus.

2.2.6.2 Communication Interfaces


Communication between database and front end pages is through PHP , which is auto configured
application for virtual server in a computer which is automatically configured for WAMP Server.
WAMP server is licensed software powered with database usage which is connected with
frontend with a connection string used is PHP pages. We can have two types of authentication
that are administrator and SQL server. It has inbuilt API for connectivity.

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

HIGH LEVEL DESIGN


3.1 Design Considerations
3.1.1 Assumptions and Dependencies
3.1.1.1 Assumptions
It is assumed new student record is created and updated by only administrator.
Attendance details are maintained to know whether student meets the attendance
requirement or not.
Student progress of each semester is to be recorded.

Parent details must be recorded for each student.


3.1.1.2 Functional Dependencies

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

3.1.2 General Constraints


General Constraints
The design involves the production of technical and visual prototypes. This stage has some nontechnical aspects such as gathering of web content; content can be one of the biggest problems in
web projects.

For the server side programming and other technical aspects of the design

emphasis will be laid on such design concepts. The goal is to make the system easier to adapt,
enhance, test and use.
Some of the general constraints are:

Clarity of the information


Each information inserted in the project shall be clear, without ambiguity. Each student has
unique information and USN that should be Stored and retrieved as and when required.

Structuring
For guaranteeing reusability of data and its information for different views and layouts the
structuring of data and separation of content, layout, and structure should be supported in future.

Verifiability of the information


Each item of information inserted in the project shall be verifiable.

Dept of ISE, R.V.C.E.

2014-2015

Automated Elective Registration And Management System

System Block Diagram

MMMS

Request

Result

Web Server

Request

Request

Result

Result
Client 2

Client 1
[ Admin]

[Student]

End User 2

End User 1

Fig: 3.2 System Block Diagram

Dept of ISE, R.V.C.E.

2014-2015

10

Automated Elective Registration And Management System

3.3

Entity Relationship Diagram

1-learns
2- belons
3- register
4-has
5-marks
6-teaches
7-attendance

Dept of ISE, R.V.C.E.

2014-2015

11

Automated Elective Registration And Management System

3.4 Data Flow Diagram


3.4.1 Level 0 Diagram

Fig:3.4.1 dataflow diagram level 0

The User sends a request which is to be authenticated, which if allowed for that type of
user and if that kind of request exist is allowed and converted into a query.

If that requests is not authenticated a response to the GUI or user end is generated for eg
validations on fields.

Query hence is executed on the server side and a output is generated and displayed to the
user.

3.4.2 Level 1 Diagram

Dept of ISE, R.V.C.E.

2014-2015
Fig:3.4.2 dataflow diagram level 1

12

Automated Elective Registration And Management System

T1: [Faculty]-It contains username and password for login(Faculty).


T2:[student]-It contains username and password for login(Students).
T3: [Electives]-Contains student elective details.

3.4.3 Level 2 Diagram

Dept of ISE, R.V.C.E.

2014-2015

13

Automated Elective Registration And Management System

3.4.3 Level 2 Diagram


Dept of ISE, R.V.C.E.

2014-2015

14

Automated Elective Registration And Management System

4.2 Definition of tables


Dept of ISE, R.V.C.E.

2014-2015

15

Automated Elective Registration And Management System


1. STUDENT TABLE
CREATE TABLE attendance (
Date date NOT NULL DEFAULT '0000-00-00',
Total_classint(5) DEFAULT NULL,
student_usnvarchar(30) NOT NULL,
elective_idvarchar(30) NOT NULL,
class_attendedint(10) DEFAULT NULL,
PRIMARY KEY (`student_usn`,`elective_id`),
KEY elective_id (`elective_id`) )

2. DEPARTMENT TABLE
CREATE TABLE department (
department_id char(30) NOT NULL,
department_namevarchar(100) DEFAULT NULL,
PRIMARY KEY (`department_id`))

3. ELECTIVE TABLE
CREATE TABLE elective (
elective_idvarchar(30) NOT NULL,
elective_namevarchar(30) DEFAULT NULL,
creditint(5) DEFAULT NULL,
assign_titlevarchar(30) DEFAULT NULL,
`department_Id` varchar(30) NOT NULL DEFAULT '',
KEY `department_Id` (`department_Id`))

4. MARKS TABLE
CREATE TABLE marks (
`student_usn` varchar(30) NOT NULL DEFAULT '',
`elective_id` varchar(30) NOT NULL DEFAULT '',
`CIE_marks` int(5) DEFAULT NULL,
`type` varchar(5) DEFAULT NULL,
`A_marks` int(5) DEFAULT NULL,
PRIMARY KEY (`student_usn`,`elective_id`),
KEY `elective_id` (`elective_id`))

5. REGISTER TABLE
CREATE TABLE register (
`student_usn` varchar(30) NOT NULL DEFAULT '',
`elective_id` varchar(30) NOT NULL DEFAULT '',
PRIMARY KEY (`student_usn`,`elective_id`),
KEY `elective_id` (`elective_id`))
Dept of ISE, R.V.C.E.

2014-2015

16

Automated Elective Registration And Management System

6. STAFF TABLE
CREATE TABLE staff (
`staff_id` varchar(30) NOT NULL DEFAULT '',
`staff_name` varchar(30) DEFAULT NULL,
`staff_desig` varchar(30) DEFAULT NULL,
`department_id` varchar(30) NOT NULL DEFAULT '',
`email_id` varchar(30) DEFAULT NULL,
`password` varchar(30) DEFAULT NULL,
PRIMARY KEY (`staff_id`,`department_id`),
KEY `department_id` (`department_id`))

7. STUDENT TABLE
CREATE TABLE student (
`student_usn` varchar(30) NOT NULL DEFAULT '',
`first_name` char(30) DEFAULT NULL,
`middle_name` char(30) DEFAULT NULL,
`last_name` char(30) DEFAULT NULL,
`semester` int(2) DEFAULT NULL,
`department_id` char(30) NOT NULL DEFAULT '',
`mobile_no` varchar(20) DEFAULT NULL,
`email_id` varchar(30) DEFAULT NULL,
`password` varchar(30) DEFAULT NULL,
PRIMARY KEY (`student_usn`,`department_id`),
KEY `student_ibfk_1 (`department_id`))

8. TEACHES TABLE
CREATE TABLE `teaches (
`elective_id` varchar(30) NOT NULL,
`staff_id` varchar(30) NOT NULL DEFAULT '',
PRIMARY KEY (`elective_id`,`staff_id`),
KEY `staff_id` (`staff_id`))

9. LEARN TABLE
CREATE TABLE learn (
`elective_id` varchar(30) NOT NULL,
`student_usn` varchar(30) NOT NULL DEFAULT '',
KEY `student_usn` (`student_usn`),
KEY `staff_id` (`staff_id`) )

10. ASSIGNMENT TABLE


CREATE TABLE assignment (
`elective_id` varchar(30) NOT NULL,
`student_usn` varchar(30) NOT NULL DEFAULT '',
Dept of ISE, R.V.C.E.

2014-2015

17

Automated Elective Registration And Management System


`staff_id` varchar(30) NOT NULL DEFAULT '');

4.3 Definition of relations and the cardinality ratios of the


participating entities
Sl.
No.
1.
2.
3.
4.
5.
6.
7.

Participating
Entity 1
Student
Student
Student
Student
Staff
Staff
Staff

Dept of ISE, R.V.C.E.

Relation

Participating
Entity 2
Registers
Elective
Marks
Elective
Attendance
Elective
Belongs
Department
Teaches
Student
Belongs_to
Department
Teaches
Elective
Table 4.3 Cardinality Ratios

2014-2015

Cardinality
Ratio
M:N
M:N
M:N
1:N
1:N
1:N
1:N

18

Automated Elective Registration And Management System

Chapter 5

IMPLEMENTATION
5.1 Selection of the platform
The platform selected for the project is windows which supports Microsoft SQL Server 2005 as it
is compatible with PHP in the front end, MYSQL in the back end and is supported by the
Microsoft SQL Server.

5.2 Selection of the programming language


Web applications are an extension of a web server PHP(Personal Home Page). Web
applications are either service oriented or presentation oriented. A presentation oriented web
application produces interactive web pages containing mark up languages like (XML and
HTML) and dynamic content in response to requests (PHP). PHP is used in programming
between back end and front end.

5.2.1 Front End: PHP


The programming language used for the development work is PHP. The reason for selection
of this language includes among many others the following few.

Open Source, PHP is completely free.

PHP can be easily embedded directly into HTML.

Platform independent can run on Windows Linux or Mac servers.

Dept of ISE, R.V.C.E.

2014-2015

19

Automated Elective Registration And Management System

Run faster on the internet and easily integrate AJAX, Callback etc.

Interfaces very easily with Apache/MySQL

Lots of good books and on-line help.

It's available with documentation in many languages.

Easy to learn compared to many other scripting languages. It has a syntax that is easy to
parse and is actually rather human-friendly.

Lots of hosting services have it ready to use, no special configuration.

Pretty easy to access other web-based tools through PHP i.e. google maps, etc.

Lots of good source code out there to use and/or learn from, as well as many useful
libraries for working with PDFs, graphics, etc.

5.2.2 BACK END: MYSQL(Microsoft SQL server Express)


MySQL is a relational data base management system (RDBMS) that runs as a server
providing multi-user access to a number of databases.

MySQL is an open source tool.


MySQL is a popular choice of database for use in web applications, and is a central
component of the widely-used LAMP web application software stack LAMP is an

acronym for "Linux, Apache, MySQL, PHP".


MySQL is primarily an RDBMS and therefore ships with no GUI tools to administer

MySQL databases or manage data contained within.


Microsoft SQL server Express Management studio provides an ease in creating tables by
a graphical as well as query based interface.

MySQL implements the following features, which some other RDBMS systems may not:

Multiple storage engines, allowing one to choose the one that is most effective for
each table in the application.

Commit grouping, gathering multiple transactions from multiple connections together to increase
the number of commits per second.

5.2.3 Server: WAMP server


Dept of ISE, R.V.C.E.

2014-2015

20

Automated Elective Registration And Management System

Microsoft SQL Server features configurable error messages,DBMS-based authentication


databases, and content negotiation. It is also supported by several graphical user
interface(GUIs).

It is auto configured with Microsoft visual studio,so there is a ease of accessing database
and creating reports and views.

Microsoft provides a free software i.e, Microsoft SQL Express which is free licensed and
is better than any other SQL system in case we want to use with Microsoft Visual
Studio .The application is available for a wide variety of operating systems, including
Unix,GNU,FreeBSD,Linux,Solaris,

Novell

Netware,

Mac

OS

X,Microsoft

Windows,OS/2,TPF, and eComStation.

These can range from server-side programming language support to authentication


schemes. Some common language interfaces support Perl,Python,Tcl, and PHP. Popular
authentication

modules

include

mod_access,

mod_auth,

mod_digest,

and

mod_auth_digest, the successor to mod_digest.

5.3 Programming Coding Guidelines


5.3.1 PHP Coding Guidelines
5.3.1.1 PHP Tags

PHP scripts can be either embedded in XHTML documents or can be stored in separate
files thar are referenced in XHTML documents.

PHP scripts are always enclosed in between two PHP tags.

This tells your server to parse the information between them as PHP.

5.3.1.2 PHP Statements

PHP statements must be inside of PHP tags to be processed by the PHP interpreter.

Each PHP statement must end with a semi-colon, which tells the PHP interpreter that the
statement is complete.

PHP

interpreter condenses all sequential whitespace in PHP scripts to a single

whitespace.

5.3.1.3 PHP Comments


PHP has two forms of comments:
Dept of ISE, R.V.C.E.

2014-2015

21

Automated Elective Registration And Management System

Single-line comments begin with a double slash(//) or #.

Multi-line comments begin with /* and with */.

5.3.1.4 PHP Functions

These are literally hundreds of built-in PHP functions that to do everything returning the
current date and time on the server to pulling data out of database.

A function might take zero arguments(for example, phpinfo(),which returns information


on the PHP environment) or it might take several arguments(for example, mail(),which
takes three required and two required and two optional arguments).

5.3.1.5 PHP Variables

A variable name must start with a letter or an underscore .

A variable name can only contain alpha-numeric characters and underscores(a-Z, 0-9, and
_ ).

A variable name should not contain spaces. If a variable name is more than one word, it
should be separted with underscore($my_string), or with capitalization($myString)

PHP variable names are case sensitive. That is the variable $count is different from
$Count.

Dept of ISE, R.V.C.E.

2014-2015

22

Automated Elective Registration And Management System

Chapter 6

TESTING
Software Testing is the process used to help identify the correctness, completeness, security
and quality of the developed computer software. Testing is the process of technical investigation
and includes the process of executing a program or application with the intent of finding errors.

Test Strategies
Test strategy tells the test plan of the project. It also tells how to test and what to test. The testing
done in this project are Unit testing and Integration testing.

Features to be tested: Form navigation and generation of reports.

Items to be tested: Functioning of forms and buttons.

Purpose of testing: To check the effective working of MDMS.

Pass / Fail Criteria: Changes made on the back end like recreation of tables should
affect the front end as well. If so ,the test is successful.

Assumptions and Constraints: Tables should be created and values have to be entered
at the back end before testing and entity integrity and referential integrity constraints
should be taken care

6.1 Unit Testing


Unit testing is a software verification and validation method in which a programmer tests if
individual units of source code are fit for use. Some of the tests performed in the project are
insert, delete, retrieve and modify.
Dept of ISE, R.V.C.E.

2014-2015

23

Automated Elective Registration And Management System

6.1.1 Unit Test Case1


Sl No. of test case : 1
Name of test : Check or login test
Item Feature being tested : Submit button
EMAIL_ID=prateekmandi007@gmail.com,PASSWORD=ise
Sample Input :
Upon mouse click on button.
Login page appears if login information is correct if not Invalid
Expected output :
EMAIL or Password appears.
Actual output : Login Page appears.
Remarks : Test succeeded
Table 6.1 Unit test case for Login Information Check operation

6.1.2 Unit Test Case2


Sl No. of test case : 2
Name of test : Check test
Item Feature being
Submit button
tested :
Sample Input :
Expected output :

USERNAME=prateekmandi007@gmail.com,PASSWORD=isw
Upon mouse click on button.
Login Button Appears if login information is correct if not Invalid

Username or Password appears.


Actual output : Message: Invalid Username or Password
Remarks : Test succeeded
. Table 6.2 Unit test case for Login Information Check operation

6.1.3 Unit Test Case3


Sl No. of test 3
case :
Name of test : Update test
Item / Feature Submit button
being tested :
Password=ise,electives=MAD,FN=Prateek,LN=Mandi,department
Sample Input : =ise,semester=6
Upon mouse click on button.
Expected output : Appearing of success and link to back page.
Actual output : Success page and link to back page appears
Remarks : Test succeeded
Table 6.3 Unit test case for updation operation
Dept of ISE, R.V.C.E.

2014-2015

24

Automated Elective Registration And Management System

6.1.4 Unit Test Case4


Sl No. of test case : 4
Name of test : Display test
Item / Feature being tested : View
USN=1RV12IS420- taken from sessions
Sample Input :
. Upon mouse click on button.
Expected output : Data successfully retrieved from the database and displayed
Actual output : Data successfully retrieved from the database and displayed
Remarks : Test succeeded
Table 6.4 Unit test case for Display operation

6.2 System Testing


6.2.1 System Test Case1
Sl No. of test case :
Name of test :
Item / Feature being tested :
Sample Input :
Expected output :
Actual output :
Remarks :

1
System overall test
Front.php
Data entered through forms
Updated data displayed in generated reports
Updated data displayed in generated reports
Test succeeded

Table 6.5 System test case for overall system check

Chapter 7
RESULTS
7.1 Snapshots
Dept of ISE, R.V.C.E.

2014-2015

25

Automated Elective Registration And Management System

Dept of ISE, R.V.C.E.

2014-2015

26

Automated Elective Registration And Management System

Dept of ISE, R.V.C.E.

2014-2015

27

Automated Elective Registration And Management System

7.2 Advantages of the project


This project is built to provide the following advantages.

The AUTOMATED ELECTIVE REGISTRATION AND MANAGEMENT software helps


the students to register electives online.

AERAM provides the facility of username and password for each student so that they can
easily view their information without taking help of administrator.

The AERAM provides a option for password change

AERAM both the faculty and student to view thier required details.

AERAM provides faculty to create and update their students details efficiently.

7.3 Limitations of the project


The project has its own limitations
The students cannot check their attendance day by day ,it will be available only when faculty
uploads the attendance details.

Dept of ISE, R.V.C.E.

2014-2015

28

Automated Elective Registration And Management System


Chapter 8

CONCLUSION
The Automated Elective Registration and Management System focuses on reducing the human
efforts for registering the electives through google forms . Thus AERAM gives customized
results all the time. The AERAM is tested and re-tested to ensure its effectiveness and provide
error free functionality to end user. The AERAM hence assures saving of time in finding details
of marks and attendance in a appropriate way.

8.1 Future Enhancement


The AERAM can overcome the previously stated limitations by adding few extra features to it
such as AERAM will provide functionality to check the attendance day by day . SMS and Email
alerts regarding NSAR and NSSR and other issues to students.

Dept of ISE, R.V.C.E.

2014-2015

29

Automated Elective Registration And Management System

REFERENCES
[1] Elmasri and Navathe, Fundamentals of Database Systems, 5th edition, Addison-Wesley, 2007.
[2] Raghu Ramakrishnan and Johannes Gehrke, Database Management Systems, 3rd edition,
McGraw-Hill, 2003.
[3] Silberschatz, Korth and Sudharshan, Database System Concepts, 5th Edition, McGraw-Hill
2006.
[4] C.J.Date, A.Kannan, S.Swamynatham, A Introduction to Database Systems, 8th edition,
Pearson Education, 2006.
[5] Herbert Schildt, C# 3.0: The Complete Reference,Tata McGraw-Hill 2009.

[6] Ian Sommerville, Software Engineering, 5th Edition, Pearson Education.

Dept of ISE, R.V.C.E.

2014-2015

30

Automated Elective Registration And Management System

LIST OF ACRONYMS
1

AERAM Automated Elective Registration and Management System

SRS: Software Requirement Specifications

ER: Entity Relationship

OS: Operating System

RAM: Random Access Memory

SQL: Structured Query Language

PHP: Hypertext Preprocessor(Personal Home Page)

RDBMS: Relational Database management system

Dept of ISE, R.V.C.E.

2014-2015

31

Automated Elective Registration And Management System


Appendix-B

CODING
Coding For Login Page
<?php
ob_start();
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="counsellor"; // Database name
$tbl_name="counsellor"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// Define $myusername and $mypassword
$myusername=$_POST['username'];
$mypassword=md5($_POST['password']);
if (!get_magic_quotes_gpc()) {
$_POST['password'] = addslashes($_POST['password']);
$_POST['username'] = addslashes($_POST['username']);

// To protect MySQL injection (more detail about MySQL injection)


$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and
password='$mypassword'";
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
Dept of ISE, R.V.C.E.

2014-2015

32

Automated Elective Registration And Management System


// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword");
header("location:c_login_success.php");
}
else {
echo "<p align=center><font color=red size=20>Wrong Username or Password</font><br><a
href=c_login.php>Please try again</a></p>";
}
ob_end_flush();
?>

Coding For Elective Registration Page


<!DOCTYPE html>
<html>
<head>
<title>Counsellor Registration </title>
<script src="gen_validatorv4.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="registration.css">
</head>
<body>
<div id="top">
<img src="background.png" alt="..." />
</div>
<div style="postion:fixed; text-align:left;">
<P><font size="40"><BR><BR><BR><BR><BR>Welcome Counsellor!</font></p></div>
<form name="reg_form" id="reg_form" method="post" action="confirm.php">
<fieldset>
<label>
Please Fill-up the form</label>

Dept of ISE, R.V.C.E.

2014-2015

33

Automated Elective Registration And Management System


</fieldset>
<label for="name">Full name</label>
<input type="text" name="name" id="name" /><BR/>
<label for="branch">Branch</label>
<select name="branch">
<option value="000">select branch</option>
<option value="Civil Engineering">Civil Engineering</option>
<option value="Mechanical Engineering">Mechanical Engineering</option>
<option value="Electrical & Electronics Engineering">Electrical & Electronics
Engineering</option>
<option value="Electronics & Communication Engineering">Electronics & Communication
Engineering</option>
<option value="Industrial Engineering & Management">Industrial Engineering &
Management</option>
<option value="Instrumentation Technology">Instrumentation Technology</option>
<option value="Chemical Engineering">Chemical Engineering</option>
<option value="Computer Science & Engineering">Computer Science & Engineering</option>
<option value="Telecommunication Engineering">Telecommunication Engineering</option>
<option value="Information Science & Engineering">Information Science &
Engineering</option>
<option value="Biotechnology">Biotechnology</option>
<option value="Architecture">Architecture</option>
</select><BR/>
<label for="username">Username</label>
<input type="text" name="username" id="username" /><BR/>
<label for="password">Password</label>
<input type="password" name="password" id="password" /><BR/>
<label for="confirm">Confirm password</label>
<input type="password" name="confirm" id="confirm" /><BR/>
<fieldset>
<input type="submit" name="submit" id="submit"/>

Dept of ISE, R.V.C.E.

2014-2015

34

Automated Elective Registration And Management System


</fieldset>
<a href="front.html"> Not a counsellor? </a>
</form>
<script type="text/javascript">
var frmvalidator = new Validator("reg_form");
frmvalidator.addValidation("name","req","Please enter Full Name");
frmvalidator.addValidation("branch","req","Please select branch");
frmvalidator.addValidation("branch","dontselect=000");
frmvalidator.addValidation("username","req","Please enter username");
frmvalidator.addValidation("password","req","Please enter password");
frmvalidator.addValidation("confirm","req","Please confirm your password");
</script>
</body>
</html>
STUDENT FORM.html
<html>
<head>
<title> Student Registration form </title>
<link rel="stylesheet" type="text/css" href="add.css">
<script type="text/javascript" src="jsDatePick.min.1.3.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.css" />
<script type="text/javascript">
window.onload = function(){
new JsDatePick({
useMode:2,
target:"inputField",
dateFormat:"%Y-%m-%d"
/*selectedDate:{ This is an example of what the full configuration offers.
day:5, For full documentation about these settings please see the full version of the code.
month:9,
year:2006
},

Dept of ISE, R.V.C.E.

2014-2015

35

Automated Elective Registration And Management System


yearsRange:[1978,2020],
limitToToday:false,
cellColorScheme:"beige",
dateFormat:"%Y-%m-%d",
imgPath:"img/",
weekStartDay:1*/
});
};
</script>
<script src="gen_validatorv4.js" type="text/javascript"></script>
</head>
<body>
<div id="top">
<p><font color="Brown" size="16">Student Details</font></p>
</div>
<form name="submitform" method="post" action="student_submit.php" id="submitform">
<label>Please fill in the details</label>
<label for"fname">First Name</label>
<input name="fname" type="text" id="fname" required autofocus>
<label for="lname">Last name</label>
<input name="lname" type="text" id="lname" required>
<label for="usn">USN</label>
<input name="usn" type="text" id="usn" required>
<label for="branch">Branch</label>
<select name="branch">
<option value="000">select branch</option>
<option value="Civil Engineering">Civil Engineering</option>
<option value="Mechanical Engineering">Mechanical Engineering</option>
<option value="Electrical & Electronics Engineering">Electrical & Electronics
Engineering</option>
<option value="Electronics & Communication Engineering">Electronics & Communication
Engineering</option>
<option value="Industrial Engineering & Management">Industrial Engineering &
Management</option>
<option value="Instrumentation Technology">Instrumentation Technology</option>
<option value="Chemical Engineering">Chemical Engineering</option>
<option value="Computer Science & Engineering">Computer Science & Engineering</option>
<option value="Telecommunication Engineering">Telecommunication Engineering</option>

Dept of ISE, R.V.C.E.

2014-2015

36

Automated Elective Registration And Management System


<option value="Information Science & Engineering">Information Science &
Engineering</option>
<option value="Biotechnology">Biotechnology</option>
<option value="Architecture">Architecture</option>
</select>

<label for="gender">Gender</label>
<input id="male" type="radio" name="gender" value="male"><font color="white">Male<BR>
<input id="female" type="radio" name="gender" value="female">Female
<div>
<label for="dob">Date of Birth</label>
<input name="dob" type="text" id="inputField"></input>
</div>
<label for="faname">Father's name</label>
<input name="faname" type="text" id="faname" required>

<label for="email">Email-id</label>
<input name="email" type="email" id="email" required>
<label for="mobile">Mobile no</label>
<input name="phone" type="text" id="mobile" required>
<label for="yoa">Year of Admission</label>
<input name="yoa" type="text" id="yoa" required>
<label for="noa">Nature of Admission</label>
<input name="noa" type="radio" value="CET">CET<BR>
<input name="noa" type="radio" value="COMED K">COMED K<BR>
<input name="noa" type="radio" id="MANAGEMENT">MANAGEMENT
</font>
<label for="rank">Rank</label>
<input name="rank" type="text" id="rank" required>
<fieldset>
<input type="submit" name="submit" onclick="return validateMyForm();" value="Submit"
id="submit">
</fieldset>
</form>
<div style="position:fixed; width:100%; height:20px; text-align:center;background-

Dept of ISE, R.V.C.E.

2014-2015

37

Automated Elective Registration And Management System


color:#23538a; padding:5px; bottom:0px; ">
<a href="c_login_success.php">Back to main page</a></div>
<script type="text/javascript">
var frmvalidator = new Validator("submitform");
//frmvalidator.EnableOnPageErrorDisplay();
//frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("fname","req","Please enter First Name");
frmvalidator.addValidation("fname","alpha","Please enter valid characters");
frmvalidator.addValidation("lname","req","Please enter your Last Name");
frmvalidator.addValidation("lname","alpha","Please enter valid characters");
frmvalidator.addValidation("usn","req","Please enter your USN");
frmvalidator.addValidation("branch","req","Please select branch");
frmvalidator.addValidation("branch","dontselect=000");
frmvalidator.addValidation("gender","selone");
//chktestValidator.addValidation("gender","selone");
frmvalidator.addValidation("faname","req","Please enter Parent Name");
frmvalidator.addValidation("dob","req","Please enter Date of birth");
frmvalidator.addValidation("email","req","Please enter Email id");
frmvalidator.addValidation("email","emial","Please enter valid email id");
frmvalidator.addValidation("phone","req","Please enter Mobile number");
frmvalidator.addValidation("phone","num","Please enter only number");
frmvalidator.addValidation("yoa","req","Please enter year of admission");
frmvalidator.addValidation("yoa","num","Please enter valid year");
frmvalidator.addValidation("noa","selone");
frmvalidator.addValidation("rank","req","Please enter rank");
frmvalidator.addValidation("rank","num","maxlength=6","Please enter valid rank");
</script>
</body>
</html>

STUDENT_SUBMIT.php
<?php
$host="localhost"; // Host name or server name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="counsellor"; // Database name
$tbl_name="student"; // Table name
// Connect to server and select database.

Dept of ISE, R.V.C.E.

2014-2015

38

Automated Elective Registration And Management System


mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// Insert data into mysql
$query="SELECT USN FROM student";
$result1 = mysql_query ($query);
while($n=mysql_fetch_array($result1)){
if (strcasecmp($n,$_POST[usn]) == 0)
{ echo "<p align=centre><font color=green size=16>USN already exists!<BR><a
href=\"student_form.html\"> please try agian </a></font></p>";
exit;
}
else
{ continue;
}
}
$sql="INSERT INTO
$tbl_name(USN,fname,lname,branch,dob,pname,email,mobile,yoa,noa,rank,gender)
VALUES('$_POST[usn]','$_POST[fname]','$_POST[lname]','$_POST[branch]','$_POST[dob]','$
_POST[faname]','$_POST[email]','$_POST[phone]','$_POST[yoa]','$_POST[noa]','$_POST[ran
k]','$_POST[gender]');"; // '$_POST[locationp]'
$result=mysql_query($sql);
// if successfully insert data into database, displays message "Successful".
if($result){
echo '<p align=centre><font color=green size=16>Successful</font></p>';
echo '<BR>';
echo '<p align=centre><font color=green size=16><a href="student_form.html">Back to main
page</a></font></p>';
}

Dept of ISE, R.V.C.E.

2014-2015

39

Automated Elective Registration And Management System


else {
echo "ERROR";
echo '<p align=centre><font color=red size=16><a href="student_form.html">Back to main
page</a></font></p>';
}
?>

Update:
<?php

$host="localhost"; // Host name or server name


$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="counsellor"; // Database name
$tbl_name="parent_contact"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql="update $tbl_name
set
pname='$_POST[pname]',
emailid='$_POST[email]',
mobile='$_POST[mobile]',
address='$_POST[addr]'
where USN='$_POST[refusn]';";
$result=mysql_query($sql);

Dept of ISE, R.V.C.E.

2014-2015

40

Automated Elective Registration And Management System


// if successfully insert data into database, displays message "Successful".
if($result){
echo '<p align=centre><font color=green size=16>Parent details successfully
updated</font></p>';
echo '<BR>';
echo '<p align=centre><font color=green size=12><a href="parentupdate.php">Back to main
page</a></font></p>';
}
else {
echo "<p align=centre><font color=red size=16>ERROR<BR></font></p>";
echo '<p align=centre><font color=red size=12><a href="parentupdate.php">Back to main
page</a></font></p>';
}
?>

Dept of ISE, R.V.C.E.

2014-2015

41

Das könnte Ihnen auch gefallen