You are on page 1of 58

JABALPUR (M.P.

MINOR PROJECT REPORT ON

Study IN Finger
Submitted to the
RAJIV GANDHI PROUDYOGIKI VISHWAVIDYALAYA,
BHOPAL
In partial fulfillment of the requirement for the award of the
Degree of

MASTER OF COMPUTER APPLICATIONS


Submitted to
DEPARTMENT OF COMPUTER APPLICATIONS
Gyan Ganga Institute of Technology & Sciences
Jabalpur (M.P.)

Submitted by
Rahul Yadav :-0206CA153D40
Neelima Patel :-0206CA141001
MCA V SEM
SESSION 2016-17

ACKNOWLEDGEMENT
Behind every successful effort their lies contribution from numerous sources
irrespective of their magnitude, my project has no exception and I take this
opportunity to thank those helping hand whole heartedly.
First and foremost, I have great pleasure in expressing our deep sense of
gratitude to Dr. Maneesh Choubey, Group Director, Gyan Ganga Group of
Institutions, for providing me the much-needed facilities throughout the duration of
the project.
We are specially thankful to Dr. Vinod Kapse, principal, Gyan Ganga
Institute of Technology & Sciences, for his continuous guidance and support
throughout the duration of the project.
We would like to owe my gratitude to HOD, Department Of Computer
Applications, for providing us a platform to initiate out towards the degree of
computer application.
Last but not the least my heartily recognition to our all academic
teachers and my family members, friends and those who directly or indirectly
helped me in this endeavor.

Thanks & Regards


Rahul Yadav
Neelima Patel

JABALPUR (M.P.)

This is to certify that the project report entitled Study In Finger


which has been completed and submitted by Rahul Yadav,Neelima
Patel the Students of Master of Computer Application (MCA) is a bonafide
work by them. This Project has been completed under the guidance and
supervision of our academic teachers.
This project report is in accordance with the requirement of degree of
Master of Computer Applications (MCA) awarded by RAJIV GANDHI
PROUDYOGIKI VISHWAVIDALAYA, Bhopal (M.P.).
External Examiner:

Internal Examiner

Date:

Date:

JABALPUR (M.P.)

CANDIDATE DECLARATION
We hereby declare that this project report titled
Study In Finger submitted by us in fulfillment for the award of
Master of Computer Applications (M.C.A.) by Rajiv Gandhi
Proudyogiki Vishwavidyalaya; Bhopal is a result of authentic work
under taken by us.
The same has not been submitted by us to this or any other
university for any other graduate/post graduate course whatsoever.
Project Submitted By :
Rahul Yadav
Neelima Patel

TABLE OF CONTENT
1. INTRODUCTION
About Project
2. SOFTWARE DEVELOPMENT
3. TECHNOLOGY USED
Front End
Back End
4. HARDWARE AND SOFTWARE REQUIREMENTS
5. DESIGN AND DEVELOPMENT
DFD
E-R Diagram
Use Case Diagram
Data Base Design
Screen Shots
Coding
6. CONCLUSION & FUTURE REQUIREMENTS
7. BIBLIOGRAPHY

1.INTRODUCTION

It is important to develop efficient website for the


student who are preparing for various exams and want
to increase their knowledge.
My website provides a way for student to learn things in
easy and simple way by which they can enhance their
knowledge .
There are many websites that provide online education
and many are also conducting online test but they are
not providing previous results of student by which
student is not able to analyse himself in proper way
and he is also not able to know in which area he have
to work hard.
So my website will provide previous result of student
and help them to analyse in which area they have to
focus.
The objective is to provide easy learning to student.
The proposed system will provide content and online
test facility at one place.
It will provide previous test results so that student can
see their progress report.
It will also provide an easy tricks to student.
Student can select test sequentially or randomly.

SOFTWARE DEVELOPMENT
Waterfall model
The waterfall model is a sequential (noniterative) design process, used in software
development processes, in which progress is seen
as flowing steadily downwards (like a waterfall)
through the phases of conception, initiation,
analysis, design, construction, testing,
production/implementation and maintenance.

Requirement Gathering and analysis: All possible


requirements of the system to be developed are captured
in this phase and documented in a requirement
specification doc.

System Design: The requirement specifications from


first phase are studied in this phase and system design is
prepared. System Design helps in specifying hardware
and system requirements and also helps in defining
overall system architecture.

Implementation: With inputs from system design, the


system is first developed in small programs called units,
which are integrated in the next phase. Each unit is
developed and tested for its functionality which is
referred to as Unit Testing.

Integration and Testing: All the units developed in the


implementation phase are integrated into a system after
testing of each unit. Post integration the entire system is
tested for any faults and failures.

Deployment of system: Once the functional and non


functional testing is done, the product is deployed in the
customer environment or released into the market.

Maintenance: There are some issues which come up in


the client environment. To fix those issues patches are
released. Also to enhance the product some better
versions are released. Maintenance is done to deliver
these changes in the customer environment .

2.TECHNOLOGY USED
Front End
PHP, HTML, CSS
PHP
PHP started out as a small open source project that
evolved as more and more people found out how
useful it was. Rasmus Lerdorf unleashed the first
version of PHP way back in 1994.

PHP is a recursive acronym for "PHP: Hypertext


Preprocessor".

PHP is a server side scripting language that is


embedded in HTML. It is used to manage dynamic
content, databases, session tracking, even build
entire e-commerce sites.

It is integrated with a number of popular


databases, including MySQL, PostgreSQL, Oracle,
Sybase, Informix, and Microsoft SQL Server.

PHP is pleasingly zippy in its execution, especially


when compiled as an Apache module on the Unix
side. The MySQL server, once started, executes
even very complex queries with huge result sets in
record-setting time.

HTML
HTMLis a markup language. a language with specific
syntax that instructs a Web browser how to display a
page. Once again, HTML separates "content" (words,
images, audio, video, and so on) from "presentation"
(instructions
for
displaying
each
type
of
content). HTML uses a pre-defined set of elements to
define content types. Elements contain one or more
"tags" that contain or express content. Tags are

enclosed by angle brackets, and the closing tag begins


with a forward slash.

CSS
CSS is the language for describing the presentation of
Web pages, including colors, layout, and fonts. It
allows one to adapt the presentation to different types
of devices, such as large screens, small screens, or
printers. CSS is independent of HTML and can be used
with any XML-based markup language.

Back End
MYSQL
MySQL is a fast, easy-to-use RDBMS being used for many small and big
businesses. MySQL is developed, marketed, and supported by MySQL AB,
which is a Swedish company. MySQL is becoming so popular because of
many good reasons:

MySQL is released under an open-source license. So you have nothing to pay


to use it.

MySQL is a very powerful program in its own right. It handles a large subset
of the functionality of the most expensive and powerful database packages.

MySQL uses a standard form of the well-known SQL data language.

MySQL works on many operating systems and with many languages including
PHP, PERL, C, C++, JAVA, etc.

MySQL works very quickly and works well even with large data sets.

MySQL is very friendly to PHP, the most appreciated language for web
development.

3.HARDWARE AND SOFTWARE REQUIREMENTS

Hardware Requirements :
Computer that has a 1.0 GHz or
faster processor.
RAM : 1 GB RAM or more.
8 GB Hard-Disk minumum.
Software Requirements :

Language : PHP

Backend : MYSQL
IDE Dreamweaver 8

4.DESIGN AND DEVELOPMENT


DFD
LEVEL 0

ER-DIGRAM

Data Base Design

admin_record
NAME

DATA TYPE

DISCRIPTION

username

CHAR(50)

Password

VARCHAR(50)

Admin password

NAME

DATA TYPE

DISCRIPTION

Sub_name

VARCHAR(30)

Primary key

Questions

VARCHAR(200)

Questions for exam

Opt1

VARCHAR(30)

Option1 for question

Opt2

VARCHAR(30)

Option2 for question

Opt3

VARCHAR(30)

Option3 for question

Opt4

VARCHAR(30)

Option4 for question

Ans

VARCHAR(30)

Correct answer

Admin name

exam1

Std_record

NAME

DATA TYPE

DISCRIPTION

rollno

Int(50)

Auto increment

firstname

Char(50)

For user first name

lastname

Char(50)

For user second name

dob

Date

User date of birth

mobile

Int(11)

User phone number

password

Varchar(50)

User enter the password

userid

Varchar(50)

Id is combination of the
firstname and second name

gender

Char(50)

Show the user is male or


female

Subject_record
NAME
Sub_name

DATA TYPE
Varchar(30)

Sub_que

Varchar(200)

Sub_ans

Varchar(1000)

DISCRIPTION

Sub_name
NAME
Sub_name

DATA TYPE
Varchar(30)

Sub_code

Varchar(50)

DISCRIPTION
For easy to select
quetions
Different code for
subject

home page

learn page

log in page

test

admin page

admin_exam

admin_delete

coding
home_page
<?php
mysql_connect("localhost","root","");
mysql_select_db("studyinfinger");
$query=mysql_query("select * from subject_rec");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link type="text/css" rel="stylesheet" href="u_master.css" media="all" />
</head>
<body>
<?php
include('u_head.php');
// include('left.php');
?>
<div >
<?php
$c=0;
while($data=mysql_fetch_array($query))
{
$c=$c+1;
?>
<h1>Question<?php echo $c?>:-<?php echo
$data['sub_qus'] ?></h1>
<h3>Answer<?php echo $c?>:-<?php echo
$data['sub_ans'] ?></h3>
<?ph

}
?>
</div>
<?php
//include('right_m.php');
include('foot_m.php');
?>
</body>
</html>

Head
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link type="text/css" rel="stylesheet" href="u_master.css" media="all" />
<script language="javascript">
var imageID=0;
function changeimage(every_seconds)
{
//change the image
if(imageID==0)
{
document.getElementById("myimage").src="image/back.jpg";
imageID++;
}
else{if(imageID==1)
{
document.getElementById("myimage").src="image/back1.jpg";
imageID++;
}

else{if(imageID==2)
{
document.getElementById("myimage").src="image/back3.jpg";
imageID=0;
}
/*else{if(imageID==3)
{
document.getElementById("myimage").src="image/hdisplay.jpg";
imageID=0;
}*/
}}
setTimeout("changeimage("+every_seconds+")",
((every_seconds)*2000)); //calling funcation of image
}

</script>
</head>
<body onload="changeimage(2)">
<div class="head">
<div id="head_left">
<br/><br/><br/>
<a href="home.php"><img src="image/head_left.png " width="98%"
height="165" /></a>
</div>
<div id="head_right">
<img id="myimage" width="99.3%" height="250px"
align="middle" style="padding:10px; background-color:#C0C0C0" />

</div></div>
<ul id="menu">
<li><a href="home.php" >Home</a>
</li>
<li><a href="learn.php" >Learn</a></li>
<li><a href="#">Result</a></li>
<li><a href="test.php">Test</a>
</li>
<li style ><?php
if (isset($_SESSION['name']))
{?>
<a href="logout.php">Logout</a>
<?php
}
else
{?>
<a href="login.php">Login</a>
<?php
}
?>
</li>
<li><?php
if (isset($_SESSION['name']))
{?>
<a href="#"><?php
echo $_SESSION['name'];?></a>
<?php }
else
{ ?>
<a href="#"><?php
echo "Guest";?></a>
<?php
}
?>

</li>
</ul>
</body>
</html>

Foot
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link type="text/css" rel="stylesheet" href="u_master.css" media="all" />
</head>
<body>
<div class="foot">
<img src="image/login_head.png" width="30%" height="200"
style="float:left"/>
<br/>
<p style="margin:5px;color:#FFFF99;text-transform:capitalize;fontsize:16px;font-family:Arial, Helvetica, sans-serif;line-height:40PX">study in
finger is optimized for learning, testing, and training. Examples might be
simplified to improve reading and basic understanding. Tutorials, references,
and examples are constantly reviewed to avoid errors, but we cannot warrant
full correctness of all content. While using this site, you agree to have read and
accepted our terms of use, cookie and privacy policy.
Copyright 1999-2015 by Rahul Yadav. All Rights Reserved.</p>
</div>
</body>
</html>

learn page
<?php
mysql_connect("localhost","root","");
mysql_select_db("studyinfinger");
$query=mysql_query("select * from subject_rec");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
include('u_head.php');
?>
<br />
<div>

<form method="post">
<table align="center">
<tr align="left"><td>select subject</td><td><select name="title">
<option value="">Select...</option>
<?php
$query=mysql_query("select * from sub_name");
while($data=mysql_fetch_array($query))
{
?>
<option value="<?php echo $data['sub_name'] ?>"><?php echo
$data['sub_name'] ?>

<?php
}
?></option>
</select>
</td><td><input type="submit" name="sub_rec"
value="Continue" style="font-size:19px;border-radius:20px;"/> </td> </tr>
</table> </form>
</div>
<div>
<?php
if(isset($_POST['sub_rec']))
{
$c=0;
$query=mysql_query("select * from subject_rec");
while($data=mysql_fetch_array($query))
{
if(($_POST['title'])== $data['sub_name'])
{
$c=$c+1;
?>
<h1>Question<?php echo $c?>:-<?php echo
$data['sub_qus'] ?></h1>
<h3>Answer<?php echo $c?>:-<?php echo
$data['sub_ans'] ?></h3>
<?php
}
}
/* else
{
if (($data['sub_name']=="c++"))
{
$c=$c+1;
?>

<h1>Question<?php echo $c?>:-<?php echo


$data['sub_qus'] ?></h1>
<h3>Answer<?php echo $c?>:-<?php echo
$data['sub_ans'] ?></h3>
<?php
}
}*/}
?>

</div>
</body>
</html>

log in page
<?php
session_start();
mysql_connect("localhost","root","");
mysql_select_db("studyinfinger");
$query=mysql_query("select * from std_record");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>login-study in finger</title>
<link type="text/css" rel="stylesheet" href="login.css"
media="all" />
<link rel="icon" href="image/titile.png" type="image/xicon"/>
<script src="jquery/jquery.min.js"></script>
<!-- jquery for slide dowen -->
<script>
$(document).ready(function()
{
$("#show").click(function()
{
$("#right").slideDown(1000);

});
});
</script>
</head>
<body>
<login style="color:#FFFFFF;">
<?php
if(isset($_POST['sign_up']))
{
$un=$_POST['first_name'];
$ln=$_POST['last_name'];
$d=$_POST['dob'];
$mob=$_POST['mobile'];
$pass=base64_encode($_POST['pass']);
$ui=$_POST['first_name'].$_POST
['last_name'];
$gen=$_POST['gen'];

$in=mysql_query("insert into std_record


values('','$un','$ln','$d','$mob','$pass','$ui','$gen')");
}
if(isset($_POST['login']))
{
$asd=1;
if ($_POST['username']!="")
while($data=mysql_fetch_array
($query))

{
if( ($_POST['username']==
$data['userid'])&&($_POST['pass_login']==base64_decode
($data['password'])) )
{
$_SESSION['name']=$data
['userid'];
header
("location:home.php");
$asd=2;
}
}
if($asd==1)
echo "wrong username and password";
}
?>
</login>
<div id="head">
<a href="home.php"><img src="image/login_head.png"
height="150px" width="40%"/></a>
</div>
<div id="head_right">
<form method="post">
<table style="border-radius:30px 0px 0px
30px;font-size:19px">
<tr><td style="padding:20px">User

Name</td><td><input type="text" name="username"/></td><td


>&nbsp;&nbsp; Password</td><td>&nbsp;&nbsp;
<input type="password"
name="pass_login"/></td></tr>
<tr><td colspan="3"></td><td><input
type="submit" name="login" value="Login" style="fontsize:19px;border-radius:20px;" /></td></tr>
</table>
</form>
</div>
<div id="left">
</div>
<div id="rigth_top">
<table align="center">
<tr align="center"><td><input type="button"
id="show" name="creat_btn" value="Creat an account"
style="font-size:19px;border-radius:20px;"/></td></tr>
</table>

<form method="post" id="right">


First Name:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp

;&nbsp;&nbsp; <input type="text" name="first_name"/>


<br/><br/>
Last Name:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp; <input type="text" name="last_name"/>
<br/><br/>
Mobile No:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="mobile"/>
<br/><br/>
D.O.B:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp; <input type="date" name="dob"/> &nbsp;
<br/><br/>
Gender
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
; <input type="radio" name="gen" value="male"/>Male
&nbsp;&nbsp;
<input type="radio" name="gen"
value="female"/>Female
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
<br/><br/>
Password:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="password" name="pass"/>
<br/><br/>
Conform password: &nbsp;&nbsp; <input
type="password" name="cpasss"/>
<br/><br/>

<table align="center">
<tr align="center"><td><input type="submit"
name="sign_up" value="SignIn" onclick="javascript:alert
('Registered Successfuly..!');" /></td></tr>
</table>
</form>
</div>
<div id="foot">
</div>
</body>
</html>

test
<?php
session_start();
mysql_connect("localhost","root","");
mysql_select_db("studyinfinger");
$query=mysql_query("select * from exam1");
if(isset($_SESSION['name']))
{
//include('u_head.php');
?>
<marquee behavior="alternate" style="font-size:18px"><username > <?
php echo $_SESSION['name']; ?></username>
</marquee>
<?php
}
else
{
header("location:home.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form method="post">
<table align="center">
<tr align="left"><td>select subject for Test</td><td><select
name="title">
<option value="">Select...</option>

<?php
$query=mysql_query("select * from sub_name");
while($data=mysql_fetch_array($query))
{
?>
<option value="<?php echo $data['sub_name'] ?>"><?php echo
$data['sub_name'] ?>
<?php
}
?></option>
</select>
</td><td><input type="submit" name="sub_exam"
value="Continue" style="font-size:19px;border-radius:20px;"/> </td> </tr>
</table> </form>
<?php
if(isset($_POST['sub_exam']))
{
$sn=$_POST['title'];
$c=0;
$query=mysql_query("select * from exam1");
while($data=mysql_fetch_array($query))
{
if($c<20)
{
if (($data['sub_name']==$sn))
{
$c=$c+1;
?>
<h2 align="left">Question<?php echo $c?>:-<?php echo
$data['question'] ?></h2>
<table align="left">
<tr align="left"><td>Answer</td><td><input type="radio"
name="res" value="option1"/><?php echo $data['opt1'];?>&nbsp;&nbsp;
</td><td>
<input type="radio" name="res" value="option2"/>
<?php echo $data['op2'];?></td></tr>

<tr align="left"><td></td><td><input type="radio" name="res"


value="option3"/><?php echo $data['opt3'];?></td>&nbsp;&nbsp;<td><input
type="radio" name="res" value="option4"/>

<?php echo $data['opt4'];?></td></tr> </table><br /><br />

<?php
}
}
}}
?>
</body>
</html>

Admin_page_code
Login
<?php
session_start();
mysql_connect("localhost","root","");
mysql_select_db("studyinfinger");
$query=mysql_query("select * from admin_record");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
if(isset($_POST['admin_log']))
{
$asd=1;
if ($_POST['username']!="")
while($data=mysql_fetch_array($query))
{
$check=$data['username'];

// user name form admin

table
if( ($_POST['username']==$data['username']) &&
($_POST['pass_login']==$data['password']))
{
header("location:admin_add.php");
$_SESSION['name']=$_POST['username'];
$asd=2;

}
}
if($asd==1)
echo "wrong username and password";
}
?>
<div>
<form method="post">
<table style="border-radius:30px 0px 0px 30px;font-size:19px">
<tr><td style="padding:20px">User Name</td><td><input
type="text" name="username"/></td><td >&nbsp;&nbsp;
Password</td><td>&nbsp;&nbsp;
<input type="password" name="pass_login"/></td></tr>
<tr><td colspan="3"></td>
<td><input type="submit" name="admin_log" value="Login"
style="font-size:19px;border-radius:20px;" /></td></tr>
</table>
</form>
</div>
</body>
</html>

admin_material
<?php
session_start();
mysql_connect("localhost","root","");
mysql_select_db("studyinfinger");
if(isset($_SESSION['name']))
{
?>
<marquee behavior="alternate" style="font-size:18px"><username > <?
php echo "Welcome To Study In Finger"; ?></username>
</marquee>
<?php
}
else
header("location:admin_log.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document
</title>
<link type="text/css" rel="stylesheet" href="master.css" media="all" />
<script src="jquery/jquery.min.js"></script>
<!-- jquery for slide dowen -->
<script>
$(document).ready(function()
{
$("#show").click(function()

{
$("#right").slideDown(1000);
});
});

</script>
</head>
<body>
<?php
include('head_admin.php');
?>
<div>
<table align="center">
<tr align="center"><td><input type="button" id="show"
name="add_sub" value="Add New Subject" style="font-size:19px;borderradius:20px;"/></td>
</tr>
</table>

<form method="post" id="right" > <!-- id="right" -->


Subject code:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp; <input type="text" name="sub_code"/>
<br/><br/>
Subject Name:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp; <input type="text" name="sub_name"/>
<br/><br/>

<br/><br/>
<table align="center">
<tr align="center"><td><input type="submit" name="insert"
value="Insert" style="font-size:19px;border-radius:20px;
onClick="javascript:alert('Subject added Successfuly..!');" />
</td></tr>
</table>
</form>
</div>
<div>
<br />
<form method="post">
<table align="center">
<tr align="left"><td>select subject</td><td><select name="title">
<option value="">Select...</option>
<?php
$query=mysql_query("select * from sub_name");
while($data=mysql_fetch_array($query))
{
?>
<option value="<?php echo $data['sub_name'] ?>"><?php echo
$data['sub_name'] ?>
<?php
}
?></option>
</select>
</td></tr>
<tr align="center"><td>Question</td><td><textarea rows="6"
cols="90" name="sub_qus"></textarea> </td></tr>
<tr align="center"><td>Answer</td><td><textarea rows="15"
cols="90" name="sub_ans"></textarea> </td></tr>
</table>
<table align="center">

<tr align="center"><td><input type="submit" name="insert_rec"


value="Insert" style="font-size:19px;border-radius:20px;
onClick="javascript:alert('Subject added Successfuly..!');" />
</td> </tr>
</table>
</form>
</div>
<?php
if(isset($_POST['insert']))
{
$sc=$_POST['sub_code'];
$sn=$_POST['sub_name'];
// $sm=$_POST['sub_mater'];
$in=mysql_query("insert into sub_name values('$sc','$sn')");
}
if(isset($_POST['insert_rec']))
{
$tit=$_POST['title'];
$sq=$_POST['sub_qus'];
$sa=$_POST['sub_ans'];

$in=mysql_query("insert into subject_rec values('$tit','$sq','$sa')");


}

include('foot_m.php');
?>
</body>
</html>

admin_exam
<?php
session_start();
mysql_connect("localhost","root","");
mysql_select_db("studyinfinger");
if(isset($_SESSION['name']))
{
?>
<marquee behavior="alternate" style="font-size:18px"><username > <?
php echo "Welcome To Study In Finger"; ?></username>
</marquee>
<?php
}
else
header("location:admin_log.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
include('head_admin.php');
?>
<div class="main_part1">
<form method="post">
<table align="center">
<tr align="left"><td>select subject</td><td><select name="title">
<option value="">Select...</option>

<?php
$query=mysql_query("select * from sub_name");
while($data=mysql_fetch_array($query))
{
?>
<option value="<?php echo $data['sub_name'] ?>"><?php echo
$data['sub_name'] ?>
<?php
}
?></option>
</select>
</td></tr>
<tr align="left"><td>Question</td><td colspan="2"><textarea
rows="15" cols="100" name="question"></textarea></td></tr>
<tr align="left"><td>Option1</td><td><input type="text"
name="opt1"/> </td>
</tr>
<tr align="left"><td>Option2</td><td><input type="text"
name="opt2"/> </td>
</tr>
<tr align="left"><td>Optio31</td><td><input type="text"
name="opt3"/> </td>
</tr>
<tr align="left"><td>Option4</td><td><input type="text"
name="opt4"/> </td>
</tr>
<tr align="left"><td>Answer</td><td><input type="radio" name="res"
value="option1"/>option1&nbsp;&nbsp;<input type="radio" name="res"
value="option2"/>
option2</td></tr>
<tr align="left"><td></td><td><input type="radio" name="res"
value="option3"/>option3&nbsp;&nbsp;<input type="radio" name="res"
value="option4"/>
option4</td></tr>
<tr align="center"><td></td><td><input type="submit" name="q_ins"
value="Insert" style="font-size:19px;border-radius:20px;
onClick="javascript:alert('question added Successfuly..!');" />
</td></tr>

</table>
</form>
</div>
<?php
if(isset($_POST['q_ins']))
{
$sn=$_POST['title'];
$sq=$_POST['question'];
$op1=$_POST['opt1'];
$op2=$_POST['opt2'];
$op3=$_POST['opt3'];
$op4=$_POST['opt4'];
$ans=$_POST['res'];
$in=mysql_query("insert into exam1
values('$sn','$sq','$op1','$op2','$op3','$op4','$ans')");
}

?>
<div>
<?php
include('foot_m.php');
?>
</div>
</body>
</html>

Admin_delete_record
<?php
session_start();
mysql_connect("localhost","root","");
mysql_select_db("studyinfinger");
if(isset($_SESSION['name']))
{
?>
<marquee behavior="alternate" style="font-size:18px"><username > <?
php echo "Welcome To Study In Finger"; ?></username>
</marquee>
<?php
}
else
header("location:admin_log.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body background="image/admin_bg.png">
<?php
include('head_admin.php');
?>
<br>
<div class="main_part1">
<table cellpadding="10" style="font-size:19px;border-radius:10px"
cellspacing="0" bordercolor="#9C9C9C">
<tr style="texttransform:capitalize;background:#DADAB6"><th>rollno</th><th>firstname</t

h><th>lastname</th><th>date of
birth</th><th>mobile</th><th>password</th>
<th>user_id</th><th>Gender</th>
<th>Delete</th>
</tr>
<?php
$query=mysql_query("select * from std_record");
while($data=mysql_fetch_array($query))
{
?>
<tr>
<td><?php echo $data['rollno'];?></td>
<td><?php echo $data['firstname']; ?></td>
<td><?php echo $data['lastname']; ?></td>
<td><?php echo $data['dob']; ?></td>
<td><?php echo $data['mobile'];?></td>
<td><?php echo $data['password'];?></td>
<td><?php echo $data['userid'];?></td>
<td><?php echo $data['gender'];?></td>
<td><a href="del_rec.php?de=<?php echo $data['rollno']; ?>">
<FORM><img src="image/delete.png" height="25" width="25"
title="Delete" /></FORM></a></td>
<!-- delete data -->
<?php
if(isset($_GET['de']))
{
$del=$_GET['de'];
$d=mysql_query("delete from record where rollno='$del'");
header("location:del_rec.php");
}
?>
<!-- end delete -->
</tr>
<?php
}

?>
</table>
</div>
</body>
<?php
include('foot_m.php');
?>
</html>

Admin_logout
<?php
session_start();
session_destroy();
header("location:admin_log.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>

6.CONCLUSION & FUTURE REQUIREMENTS

You might also like