You are on page 1of 85

1.

INTRODUCTION
On-line Exam System is very useful for educational institute to prepare an exam, safe
the time that will take to check the paper and prepare mark sheets. It will help the
Institute to testing of students and develop their skills. The effective use of "On-line
Exam System", any Educational Institute or training centre can be use it to develop their
strategy for putting the exams, and for getting better results in less time.

The Online Examination System will permit to take and give online examination and
maintaining master information and generating various reports of test. The main users
of the project are Student or Member and system Administrator.

From an end-user perspective, the e Examination System Project consists of two


functional elements:

1. Enhanced Member modules for registration, giving examination, manage profile.

2. Administration module for Mange members, examination, question bank and view
the reports.

1.1. OVEVIEW

The online test created for taking online test has following stages-

Login

Test

Result

Login:- There is a quality login window because this is more secure than other login
forms as in a normal login window there are multiple logins available so that more than
one person can access to test with there individual login. But in this project there is only
one login id i.e. administrator id and password by which a person enter the site. Hence it
is more secure and reliable than previously used on-line test simulators.

Test:- Test page is the most creative and important page in this project. It consists of 2
modules namely:

1
Subject selection

Utilities

Subject selection:- From the given choices the candidate can select his field (like C,
C++ and JAVA etc.) for taking on with the test.

Utilities:-

1. Skip and come back to the question afterwards if needed.

2. Gives the list of attempted and unattempted questions and can go to any question
directly and can either attempt or change the answer of the already attempted question

1.1. CURRENT SYSTEM

The whole process of assigning test and evaluating their scores after the test, was done
manually till date. Processing the test paper i.e. checking and distributing respective
scores used to take time when the software was not installed.

 Disadvantages of Current System

•  The current system is very time consuming.

• To take exam of more candidates more invigilators are required but no need of
invigilator in case of online examination.

• The chances of paper leakage are more in current system as compared to proposed
system.

• Result processing takes more time as it is done manually.

2
PROPOSED SYSTEM

The online test created for taking online test has following features.

•  In comparison to the present system the proposed system will be less time consuming
and is more efficient.

• Result will be very precise and accurate and will be declared in very short span of time
because calculation and evaluations are done by the simulator itself.

• The proposed system is very secure as no chances of leakage of question paper as it is


dependent on the administrator only.

• The logs of appeared candidates and their marks are stored and can be backup for
future use

Advantages of proposed system

• Physical presence at a given location is absolutely not necessary

• No time is spent on evaluation

• Results are available instantly

• Can be easily accessed 24/7 over the open test period

3
• Can be timed to allow Y minutes to answer X number of questions

• Easy Accessibility.

• Available at a reduced cost.

• Accuracy in checking the answer, calculating result.

• User friendly.

• Secure because of authentication .

• Online exams - Convenience, security and flexibility.

1.2. PURPOSE

• Stored Repository of exams

• General problem with time for students

• Auto grading

• Flexible

• Time Saver

• Security

• Develop a system which allows the faculty to create, modify and store questions
which can be grouped together to form sections and these sections can be grouped
together to form tests/examinations.

• The result will be shown immediately to the participating students

• The project allows faculties to create their own tests. It would enable educational
institutes to perform tests, quiz and create feedback forms.

4
1.3. SCOPE

Scope of this project is very broad in terms of other manually taking exams.

Few of them are:-

• This can be used in educational institutions as well as in corporate world.

• Can be used anywhere any time as it is a web based application(user Location doesn’t
matter).

• No restriction that examiner has to be present when the candidate takes the test.

• Design to facilitate Administrator and User

• Online examination is designed for educational institutes like Schools ,colleges and
private institutes to conduct logic tests of their students or employees on regular basis

1.4. TOOLS USED

ONLINE EXAM is a web application built in XAMPP, My SQL, java script

5
1.5. METHODOLOGY OF ONLINE EXAM

Team of developers must integrate with a development strategy that include the process,
methods and tools layer and generic phases. This strategy is often referred to a process
model or a software developing paradigm.

Our project follows the waterfall model.

The steps of waterfall model are:

• Requirement Definition

• System and Software Design

• Implementation

• Integration and System Testing

• Operation and Maintenance

6
1.6. TECHNOLOGIES TO BE USED

1. XAMPP

2. HTML (Hyper Text Markup Language)

3. JS (JavaScript)

4.My SQL (Structure Query Language)

XAMPP

XAMPP is a free and open source cross platform web server solution stack package,
consisting mainly of the Apache HTTP Server, My SQL Database and interpreters for
scripts written in the PHP and Perl programming languages.

Officially, XAMPP's designers intended it for use only as a development tool, to allow
website designers and programmers to test their work on their own computers without
any access to the Internet. 

HTML (Hyper Text Markup Language)

HTML is a computer language devised to allow website creation. These websites can
then be viewed by anyone else connected to the Internet. It is relatively easy to learn,
with the basics being accessible to most people in one sitting; and quite powerful in
what it allows you to create. It is constantly undergoing revision and evolution to meet
the demands and requirements of the growing Internet audience under the direction of
the W3C, the organization charged with designing and maintaining the language.

JS (JavaScript)

JavaScript (JS) is a scripting language, primarily used on the Web. It is used to


enhance HTML pages and is commonly found embedded in HTML code. JavaScript is
an interpreted language. Thus, it doesn't need to be compiled. JavaScript renders web
pages in an interactive and dynamic fashion. This allowing the pages to react to events,
exhibit special effects, accept variable text, validate data, create cookies, detect a user’s
browser, etc.

7
MySQL (Structure Query Language)

SQL (Structured Query Language) is a standardized programming language used for


managing relational databases and performing various operations on the data in them.
Initially created in the 1970s, SQL is regularly used by database administrators, as well
as by developers writing data integration scripts and data analysts looking to set up and
run analytical queries.

2. OVERALL DESCRIPTION

2.1Product Perspective

2.2. SOFTWARE INTERFACE

Client on Internet
Web Browser, Operating System (any)
Client on Intranet
Web Browser, Operating System (any)
Web Server
XAMPP, Operating System (any)
8
Data Base Server
MySQL, Operating System (any)
Development End
HTML,javascript, MySQL, PHP,OS (Windows)]

2.3. HARDWARE INTERFACE


Minimum Requirements

Client Side
Processor RAM Disk Space

Internet Intel Pentium >128 MB >100MB


Explorer III
any
Server Side
Xampp Pentium III or >512 MB >1GB
any improved
version

MySQL Pentium III or >512 MB >1GB (Excluding


any improved data size)
version

2.4 COMMUNICATION INTERFACE

 Client (customer) on Internet will be using HTTP/HTTPS protocol.


 Client (system user) on Internet will be using HTTP/HTTPS protocol.

2.5 CONSTRAINTS

 GUI is only in English

 Login and password is used for identification of users

 Only registered users can access


9
2.6. CONTEXT DIAGRAM

The Administrator can be done the following:

Create/delete accounts (add a list of faculty names and list of his student)

 Change password for Faculty/Student

 Create/ delete/update courses (subject).

The (ADMINISTRATOR) Faculty can be done the following:

 Change password.

 Insert questions.

 Specify the answers.

 Update mark of questions and answers.

The Student can be done the following: Change password.

 Choose exam.

 Review answers.

10
 See his exam mark.

 View other material.

2.7. ER DIAGRAM

11
2.8. DATA FLOW DIAGRAMS

12
2.9. DATABASE DESIGN

USERS

13
3.SPECIFIC DIAGRAMS

3.1. USE CASE DIAGRAM

14
3.2. ACTIVITY DIAGRAMS

15
16
3.3. SEQUENCE DIAGRAMS

17
18
19
4. SUPPORTING INFORMATION

4.1. SCREENSHOTS

HOME

SIGN UP

20
LOGIN

COURSE

21
SUBJECT FOR EXAM

QUESTIONS

22
RESULT

LOGOUT

23
5. CODING
HEADER
<style type="text/css">

<!--

body {

margin-left: 0px;

margin-top: 0px;

-->

</style>

<table border="0" width="100%" cellspacing="0" cellpadding="0"


background="../image/topbkg.jpg">

<tr>

<td width="90%" valign="top">

<!--You can modify the text, color, size, number of loops and more on the flash header
by editing the text file (fence.txt) included in the zip file.-->

<div align="left"><object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000

24
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ver
sion=5,0,2,0

width=500

height=68>

<param name=movie value=../image/fence.swf>

<param name=quality value=high>

<param name=BGCOLOR value=#000000>

<param name=SCALE value=showall>

<param name=wmode value=transparent>

<embed src=../image/fence.swf

quality=high

pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash

width=500

height=68

bgcolor=#000000

scale= showall>

</embed>

</object></div></td>

<td width="10%">

<img border="0" src="../image/topright.jpg" width="203" height="68"


align="right"></td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000"


background="../image/blackbar.jpg">

<tr>

<td width="100%"><img border="0" src="../image/blackbar.jpg" width="89"


height="15"></td>

</tr>

</table>
25
<table width="100%">

<tr>

<td aling=right>

<?php

if(isset($_SESSION['alogin']))

echo "<div align=\"right\"><strong><a href=\"login.php\">Admin Home</a>|<a


href=\"signout.php\">Signout</a></strong></div>";

else

echo "&nbsp;";

?>

</td>

</tr>

</table>

INDEX
<?php

session_start()

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Administrative Login - Online Exam</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../quiz.css" rel="stylesheet" type="text/css">

26
</head>

<body>

<?php

include("header.php");

?>

<p class="head1">Adminstrative Login </p>

<form name="form1" method="post" action="login.php">

<table width="490" border="0">

<tr>

<td width="106"><span class="style2"></span></td>

<td width="132"><span class="style2"><span class="head1"><img src="login.jpg"


width="131" height="155"></span></span></td>

<td width="238"><table width="219" border="0" align="center">

<tr>

<td width="163" class="style2">Login ID </td>

<td width="149"><input name="loginid" type="text" id="loginid"></td>

</tr>

<tr>

<td class="style2">Password</td>

<td><input name="pass" type="password" id="pass"></td>

</tr>

<tr>

<td class="style2">&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr>

<td class="style2">&nbsp;</td>

<td><input name="submit" type="submit" id="submit" value="Login"></td>

</tr>

27
</table></td>

</tr>

</table>

</form>

</body>

LOGIN
<?php

session_start();

error_reporting(1);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Adminstrative AreaOnline Quiz </title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../quiz.css" rel="stylesheet" type="text/css">

</head>

<body>

<?php

include("header.php");

extract($_POST);

if(isset($submit))

include("../database.php");

28
$rs=mysql_query("select * from mst_admin where loginid='$loginid' and
pass='$pass'",$cn) or die(mysql_error());

if(mysql_num_rows($rs)<1)

echo "<BR><BR><BR><BR><div class=head1> Invalid User Name or


Password<div>";

exit;

$_SESSION['alogin']="true";

else if(!isset($_SESSION[alogin]))

echo "<BR><BR><BR><BR><div class=head1> Your are not logged in<br> Please


<a href=index.php>Login</a><div>";

exit;

?>

<p class="head1">Welcome to Admistrative Area </p>

<div style="margin:auto;width:90%;height:500px;box-shadow:2px 1px 2px 2px


#CCCCCC;text-align:left">

<div style="margin-left:20%;padding-top:5%">

<p class="style7"><a href="subadd.php">Add Subject</a></p>

<p class="style7"><a href="testadd.php">Add Test</a></p>

<p class="style7"><a href="questionadd.php">Add Question </a></p>

<p align="center" class="head1">&nbsp;</p>

</div>

</div>

29
</body>

</html>

QUESTION ADD
<?php

session_start();

require("../database.php");

include("header.php");

error_reporting(1);

?>

<link href="../quiz.css" rel="stylesheet" type="text/css">

<?php

extract($_POST);

echo "<BR>";

if (!isset($_SESSION[alogin]))

echo "<br><h2><div class=head1>You are not Logged On Please Login to Access


this Page</div></h2>";

echo "<a href=index.php><h3 align=center>Click Here for Login</h3></a>";

exit();

echo "<BR><h3 class=head1>Add Question </h3>";

if($_POST[submit]=='Save' || strlen($_POST['testid'])>0 )

extract($_POST);

mysql_query("insert into mst_question(test_id,que_desc,ans1,ans2,ans3,ans4,true_ans)


values ('$testid','$addque','$ans1','$ans2','$ans3','$ans4','$anstrue')",$cn) or
die(mysql_error());

echo "<p align=center>Question Added Successfully.</p>";

unset($_POST);
30
}

?>

<SCRIPT LANGUAGE="JavaScript">

function check() {

mt=document.form1.addque.value;

if (mt.length<1) {

alert("Please Enter Question");

document.form1.addque.focus();

return false;

a1=document.form1.ans1.value;

if(a1.length<1) {

alert("Please Enter Answer1");

document.form1.ans1.focus();

return false;

a2=document.form1.ans2.value;

if(a1.length<1) {

alert("Please Enter Answer2");

document.form1.ans2.focus();

return false;

a3=document.form1.ans3.value;

if(a3.length<1) {

alert("Please Enter Answer3");

document.form1.ans3.focus();

return false;

a4=document.form1.ans4.value;
31
if(a4.length<1) {

alert("Please Enter Answer4");

document.form1.ans4.focus();

return false;

at=document.form1.anstrue.value;

if(at.length<1) {

alert("Please Enter True Answer");

document.form1.anstrue.focus();

return false;

return true;

</script>

<div style="margin:auto;width:90%;height:500px;box-shadow:2px 1px 2px 2px


#CCCCCC;text-align:left">

<form name="form1" method="post" onSubmit="return check();">

<table width="80%" border="1" align="center">

<tr>

<td width="24%" height="32"><div align="left"><strong>Select Test Name


</strong></div></td>

<td width="1%" height="5">

<td width="75%" height="32"><select name="testid" id="testid">

<?php

$rs=mysql_query("Select * from mst_test order by test_name",$cn);

while($row=mysql_fetch_array($rs))

if($row[0]==$testid)

{
32
echo "<option value='$row[0]' selected>$row[2]</option>";

else

echo "<option value='$row[0]'>$row[2]</option>";

?>

</select>

<tr>

<td height="26"><div align="left"><strong> Enter Question </strong></div></td>

<td>&nbsp;</td>

<td><textarea name="addque" cols="60" rows="2" id="addque"></textarea></td>

</tr>

<tr>

<td height="26"><div align="left"><strong>Enter Answer1 </strong></div></td>

<td>&nbsp;</td>

<td><input name="ans1" type="text" id="ans1" size="85" maxlength="85"></td>

</tr>

<tr>

<td height="26"><strong>Enter Answer2 </strong></td>

<td>&nbsp;</td>

<td><input name="ans2" type="text" id="ans2" size="85" maxlength="85"></td>

</tr>

<tr>

<td height="26"><strong>Enter Answer3 </strong></td>

<td>&nbsp;</td>

<td><input name="ans3" type="text" id="ans3" size="85" maxlength="85"></td>


33
</tr>

<tr>

<td height="26"><strong>Enter Answer4</strong></td>

<td>&nbsp;</td>

<td><input name="ans4" type="text" id="ans4" size="85" maxlength="85"></td>

</tr>

<tr>

<td height="26"><strong>Enter True Answer </strong></td>

<td>&nbsp;</td>

<td><input name="anstrue" type="text" id="anstrue" size="50"


maxlength="50"></td>

</tr>

<tr>

<td height="26"></td>

<td>&nbsp;</td>

<td><input type="submit" name="submit" value="Add" ></td>

</tr>

</table>

</form>

<p>&nbsp; </p>

</div>

SIGN OUT
<?php

session_start();

session_destroy();

header("Location: index.php");

?>

SUB ADD
<?php
34
session_start();

require("../database.php");

include("header.php");

error_reporting(1);

?>

<link href="../quiz.css" rel="stylesheet" type="text/css">

<?php

extract($_POST);

echo "<BR>";

if (!isset($_SESSION['alogin']))

echo "<br><h2><div class=head1>You are not Logged On


Please Login to Access this Page</div></h2>";

echo "<a href=index.php><h3 align=center>Click Here for


Login</h3></a>";

exit();

echo "<BR><h3 class=head1>Subject Add </h3>";

echo "<table width=100%>";

echo "<tr><td align=center></table>";

if($submit=='submit' || strlen($subname)>0 )

$rs=mysql_query("select * from mst_subject where sub_name='$subname'");

if (mysql_num_rows($rs)>0)

echo "<br><br><br><div class=head1>Subject is Already


Exists</div>";
35
exit;

mysql_query("insert into mst_subject(sub_name) values ('$subname')",$cn) or


die(mysql_error());

echo "<p align=center>Subject <b> \"$subname \"</b> Added Successfully.</p>";

$submit="";

?>

<SCRIPT LANGUAGE="JavaScript">

function check() {

mt=document.form1.subname.value;

if (mt.length<1) {

alert("Please Enter Subject Name");

document.form1.subname.focus();

return false;

return true;

</script>

<div style="margin:auto;width:90%;height:500px;box-shadow:2px 1px 2px 2px


#CCCCCC;text-align:left">

<title>Add Subject</title>

<form name="form1" method="post" onSubmit="return check();">

<table width="41%" border="0" align="center">

<tr>

<td width="45%" height="32"><div align="center"><strong>Enter Subject Name


</strong></div></td>

<td width="2%" height="5">

<td width="53%" height="32">


36
<input name="subname" placeholder="enter language name" type="text"
id="subname">

<tr>

<td height="26"> </td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr>

<td height="26"></td>

<td>&nbsp;</td>

<td><input type="submit" name="submit" value="Add" ></td>

</tr>

</table>

</form>

<p>&nbsp; </p>

</div>

TESTADD
<?php

session_start();

error_reporting(1);

if (!isset($_SESSION['alogin']))

echo "<br><h2>You are not Logged On Please Login to Access this Page</h2>";

echo "<a href=index.php><h3 align=center>Click Here for Login</h3></a>";

exit();

?>

<link href="../quiz.css" rel="stylesheet" type="text/css">

37
<?php

require("../database.php");

include("header.php");

echo "<br><h2><div class=head1>Add Test</div></h2>";

if($_POST[submit]=='Save' || strlen($_POST['subid'])>0 )

extract($_POST);

mysql_query("insert into mst_test(sub_id,test_name,total_que) values


('$subid','$testname','$totque')",$cn) or die(mysql_error());

echo "<p align=center>Test <b>\"$testname\"</b> Added Successfully.</p>";

unset($_POST);

?>

<SCRIPT LANGUAGE="JavaScript">

function check() {

mt=document.form1.testname.value;

if (mt.length<1) {

alert("Please Enter Test Name");

document.form1.testname.focus();

return false;

tt=document.form1.totque.value;

if(tt.length<1) {

alert("Please Enter Total Question");

document.form1.totque.value;

return false;

38
}

return true;

</script>

<form name="form1" method="post" onSubmit="return check();">

<table width="58%" border="0" align="center">

<tr>

<td width="49%" height="32"><div align="left"><strong>Enter Subject ID


</strong></div></td>

<td width="3%" height="5">

<td width="48%" height="32"><select name="subid">

<?php

$rs=mysql_query("Select * from mst_subject order by sub_name",$cn);

while($row=mysql_fetch_array($rs))

if($row[0]==$subid)

echo "<option value='$row[0]' selected>$row[1]</option>";

else

echo "<option value='$row[0]'>$row[1]</option>";

?>

</select>

<tr>

<td height="26"><div align="left"><strong> Enter Test Name


</strong></div></td>
39
<td>&nbsp;</td>

<td><input name="testname" type="text" id="testname"></td>

</tr>

<tr>

<td height="26"><div align="left"><strong>Enter Total Question


</strong></div></td>

<td>&nbsp;</td>

<td><input name="totque" type="text" id="totque"></td>

</tr>

<tr>

<td height="26"></td>

<td>&nbsp;</td>

<td><input type="submit" name="submit" value="Add" ></td>

</tr>

</table>

</form>

<p>&nbsp; </p>

SQL DB EXAM
-- phpMyAdmin SQL Dump

-- version 2.10.1

-- http://www.phpmyadmin.net

--

-- Host: localhost

-- Generation Time: Oct 10, 2010 at 09:32 PM

-- Server version: 5.0.37

-- PHP Version: 5.2.2

40
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--

-- Database: `quiz`

--

-- --------------------------------------------------------

--

-- Table structure for table `mst_admin`

--

CREATE TABLE `mst_admin` (

`loginid` varchar(20) default NULL,

`pass` varchar(20) default NULL

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--

-- Dumping data for table `mst_admin`

--

INSERT INTO `mst_admin` VALUES ('mca', 'mca');

-- --------------------------------------------------------

--

-- Table structure for table `mst_question`

--

41
CREATE TABLE `mst_question` (

`que_id` int(5) NOT NULL auto_increment,

`test_id` int(5) default NULL,

`que_desc` varchar(150) default NULL,

`ans1` varchar(75) default NULL,

`ans2` varchar(75) default NULL,

`ans3` varchar(75) default NULL,

`ans4` varchar(75) default NULL,

`true_ans` int(1) default NULL,

PRIMARY KEY (`que_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=134 ;

--

-- Dumping data for table `mst_question`

--

INSERT INTO `mst_question` VALUES (16, 8, 'What Default Data Type ?', 'String',
'Variant', 'Integer', 'Boolear', 2);

INSERT INTO `mst_question` VALUES (17, 8, 'What is Default Form Border Style ?',
'Fixed Single', 'None', 'Sizeable', 'Fixed Diaglog', 3);

INSERT INTO `mst_question` VALUES (18, 8, 'Which is not type of Control ?', 'text',
'lable', 'checkbox', 'option button', 1);

INSERT INTO `mst_question` VALUES (19, 9, 'Which of the follwing contexts are
available in the add watch window?', 'Project', 'Module', 'Procedure', 'All', 4);

INSERT INTO `mst_question` VALUES (20, 9, 'Which window will allow you to halt
the execution of your code when a variable changes?', 'The call stack window', 'The
immedite window', 'The locals window', 'The watch window', 4);

INSERT INTO `mst_question` VALUES (22, 9, 'How can you print the object name
associated with the last VB error to the Immediate window?', 'Debug.Print
Err.Number', 'Debug.Print Err.Source', 'Debug.Print Err.Description', 'Debug.Print
Err.LastDLLError', 2);

INSERT INTO `mst_question` VALUES (23, 9, 'How can you print the object name
associated with the last VB error to the Immediate window?', 'Debug.Print
42
Err.Number', 'Debug.Print Err.Source', 'Debug.Print Err.Description', 'Debug.Print
Err.LastDLLError', 2);

INSERT INTO `mst_question` VALUES (24, 9, 'What function does the TabStop
property on a command button perform?', 'It determines whether the button can get the
focus', 'If set to False it disables the Tabindex property.', 'It determines the order in
which the button will receive the focus', 'It determines if the access key swquence can
be used', 1);

INSERT INTO `mst_question` VALUES (25, 10, 'You application creates an instance
of a form. What is the first event that will be triggered in the from?', 'Load', 'GotFocus',
'Instance', 'Initialize', 4);

INSERT INTO `mst_question` VALUES (26, 10, 'Which of the following is Hungarian
notation for a menu?', 'Menu', 'Men', 'mnu', 'MN', 3);

INSERT INTO `mst_question` VALUES (27, 10, 'You are ready to run your program to
see if it works.Which key on your keyboard will start the program?', 'F2', 'F3', 'F4', 'F5',
4);

INSERT INTO `mst_question` VALUES (28, 10, 'Which of the following snippets of
code will unload a form named frmFo0rm from memory?', 'Unload Form', 'Unload
This', 'Unload Me', 'Unload', 3);

INSERT INTO `mst_question` VALUES (29, 10, 'You want the text in text box named
txtMyText to read My Text.In which property will you place this string?', 'Caption',
'Text', 'String', 'None of the above', 2);

INSERT INTO `mst_question` VALUES (30, 11, 'How many data types are there in
c ?', '8', '7', '6', '5', 3);

INSERT INTO `mst_question` VALUES (31, 11, 'Range of integer type of data ?', '-
32768 to 32767', '123-133', '152 to 258', '-78954 to 32564', 1);

INSERT INTO `mst_question` VALUES (32, 11, 'getchar() is used to get ?', 'integer',
'string', 'character', 'print', 3);

INSERT INTO `mst_question` VALUES (33, 11, 'gets() is used to get???', 'number',
'character', 'string', 'integer', 3);

INSERT INTO `mst_question` VALUES (34, 11, 'short cut key to save is _', 'f4', 'f9',
'f2', 'f1', 3);

INSERT INTO `mst_question` VALUES (35, 11, 'short cut key to close the
program?.?', 'f7', 'f3', 'f8', 'f9', 2);

INSERT INTO `mst_question` VALUES (36, 11, 'who invented c language ?', 'Denis
Ritchie', 'Pascal Blaise', 'Denis reddy', 'Bill gets', 1);

INSERT INTO `mst_question` VALUES (37, 11, 'To come out of c __shortcut key is
used?', 'alt+b', 'alt+k', 'alt+m', 'alt+x', 4);

43
INSERT INTO `mst_question` VALUES (38, 11, 'strlen() return _____ types of data ?',
'integer', 'character', 'string', 'void', 1);

INSERT INTO `mst_question` VALUES (40, 11, 'how many keyword are there in c?',
'56', '54', '64', '32', 4);

INSERT INTO `mst_question` VALUES (49, 11, 'for multiline comment ___ is used',
'//', '??', '/*', '\\*', 3);

INSERT INTO `mst_question` VALUES (50, 11, '"default: " statement is a part of ___',
'switch case', 'If else', 'if', 'loop', 1);

INSERT INTO `mst_question` VALUES (53, 11, 'or operator in c is ________type of


operator ?', 'arethametic', 'logical', 'bitwise', 'conditional', 2);

INSERT INTO `mst_question` VALUES (54, 11, '___is assignment operator in c ?', '*',
'++', '=', '--', 3);

INSERT INTO `mst_question` VALUES (55, 11, 'Every function returns___type of


value ?', 'int', 'char', 'float', 'none of these', 4);

INSERT INTO `mst_question` VALUES (56, 11, 'what is the answer of 8%5', '4.5', '3',
'1', '1.3', 2);

INSERT INTO `mst_question` VALUES (57, 11, 'gets() is defined in ?', 'stdio.h',
'conio.h', 'string.h', 'dos.h', 1);

INSERT INTO `mst_question` VALUES (58, 11, '__key is used to zoom the screen',
'f5', 'f6', 'f9', 'alt+f9', 1);

INSERT INTO `mst_question` VALUES (59, 11, '____decision making control', 'for
loop', 'do while', 'function', 'switch case', 4);

INSERT INTO `mst_question` VALUES (60, 12, 'RAM Stands for', 'Random Access
Memory', 'Random accelerated Memory', 'Random Access Machenism', 'Random
Accurace Mantan', 1);

INSERT INTO `mst_question` VALUES (61, 12, 'PC Stands for', 'pocket computer',
'personal computer', 'phisycal computer', 'personal card', 2);

INSERT INTO `mst_question` VALUES (62, 12, 'Personal Computer are the type of
computer', 'super computer', 'mini computer', 'micro computer', 'mainframe computer',
3);

INSERT INTO `mst_question` VALUES (63, 12, 'floppy disk is the type of memory',
'magnatic & secondarymain memory', 'main memory', 'o primary', 'none of the above',
1);

INSERT INTO `mst_question` VALUES (64, 12, 'keybord is the type of device', 'input',
'pointing', 'output', 'sound', 1);

44
INSERT INTO `mst_question` VALUES (65, 12, 'mouse is the type of device', 'input',
'pointing', 'scanning', 'none of the above', 2);

INSERT INTO `mst_question` VALUES (66, 12, 'which of the following is input
device', 'speaker', 'printer', 'plotter', 'scanner', 4);

INSERT INTO `mst_question` VALUES (67, 12, '________is colled the brain of
computer', 'mouse', 'keyboard', 'cpu', 'memory', 3);

INSERT INTO `mst_question` VALUES (68, 12, 'the development of first generation
computer is', '1955-1965', '1965-1975', '1945-1954', 'none', 3);

INSERT INTO `mst_question` VALUES (69, 12, 'all arithmetic and logical processing
is done in', 'ALU', 'CU', 'CPU', 'none of the above', 3);

INSERT INTO `mst_question` VALUES (70, 12, 'the delete the character right side of
the cursor which key is used', 'inst', 'del', 'backspace', 'home', 2);

INSERT INTO `mst_question` VALUES (71, 12, 'to deleter the character towards left
side is', 'backspace', 'del', 'inst', 'home', 1);

INSERT INTO `mst_question` VALUES (72, 12, 'in keyboard the function of which
type keys change according the software', 'alphanumeric key', 'numeric key pad',
'function key', 'none of the above', 2);

INSERT INTO `mst_question` VALUES (73, 12, 'to enter the number a special key slot
is given on the keyboard which is', 'alphanumeric number', 'numeric key pad', 'function
key', 'none of the above', 2);

INSERT INTO `mst_question` VALUES (74, 12, 'on numeric key pad the keyu present
are', '0 to 9 numbers', '+/*characters', 'arrow key', 'all of the above', 4);

INSERT INTO `mst_question` VALUES (75, 12, 'to move the cursor beginning of the
which key is used', 'end', 'home', 'pgup', 'pgdn', 2);

INSERT INTO `mst_question` VALUES (76, 12, 'to move the cursor end of the which
key is used', 'end', 'home', 'pgup', 'pgdn', 1);

INSERT INTO `mst_question` VALUES (77, 12, 'the touchable part of computer is
called as', 'hardware', 'software', 'programe', 'none', 1);

INSERT INTO `mst_question` VALUES (78, 12, 'if caps lock key is on then', 'small
letters are printed', 'the lowercase letter are printed', 'capital letters print', 'none of the
above', 3);

INSERT INTO `mst_question` VALUES (79, 12, '________are equivalent to 1 mb',


'1022 kb', '1024 kb', '1024 byte', '1000 gb', 2);

INSERT INTO `mst_question` VALUES (80, 13, 'the combination key for command in
ms-word is', 'ctrl+f', 'ctrl+f3', 'ctrl+s', 'none', 1);

45
INSERT INTO `mst_question` VALUES (81, 13, 'while editing document in ms-word
the colour of the selected text can be changed by', 'format font', 'format text', 'format
paragraph', 'none of the above', 1);

INSERT INTO `mst_question` VALUES (82, 13, 'which keystroke is used to move end
of document quickly', 'end', 'pgdn', 'ctrl+pgdn', 'ctrl+end', 4);

INSERT INTO `mst_question` VALUES (83, 13, 'from the following option does not
present in the picture option of insert menu', 'auto shpe', 'clip art', 'from file', 'object', 4);

INSERT INTO `mst_question` VALUES (84, 13, 'in ms-word to appear full form
abberiatin automatically we can use', 'autotext', 'auto correct', 'comments', 'drop cap', 1);

INSERT INTO `mst_question` VALUES (85, 13, 'to appear the same information at the
top or bottom of each page we use', 'headers & footer', 'hyperlink', 'field', 'none', 1);

INSERT INTO `mst_question` VALUES (86, 13, 'which option is not present under
tool menu', 'mail merge', 'auto text', 'language', 'drop cap', 4);

INSERT INTO `mst_question` VALUES (87, 13, 'to convert "the computer" in to "THE
COMPUTER" which option is used', 'title case', 'toggle case', 'upper case', 'all caps', 3);

INSERT INTO `mst_question` VALUES (88, 13, 'which is the shortcut key to replace
the text', 'ctrl+r', 'ctrl+h', 'ctrl+d', 'ctrl+e', 2);

INSERT INTO `mst_question` VALUES (89, 13, 'which sortcut key is used to redo
action?', 'ctrl+r', 'ctrl+y', 'ctrl+e', 'ctrl+u', 2);

INSERT INTO `mst_question` VALUES (90, 13, 'to change the size of document page
using', 'file properties', 'file page setup', 'tools option', 'format paragraph', 2);

INSERT INTO `mst_question` VALUES (91, 13, 'to set the shading for the paragrph in
ms-word chose', 'insert shading', 'format border & shading', 'view shading', 'all the
above', 2);

INSERT INTO `mst_question` VALUES (92, 13, 'bold,italic,underline are the part
of_________toolbar', 'formating', 'standerd', 'drawing', 'central', 1);

INSERT INTO `mst_question` VALUES (93, 13, 'the list in bottom of the file menu',
'display last foure file you use', 'display all opened files', 'allow to close file', 'none of
the above', 1);

INSERT INTO `mst_question` VALUES (94, 13, 'the date and time command', 'inaert
the date & time you specify', 'insert current system date & time', 'inmsert last updated
date & time', 'none of the above', 2);

INSERT INTO `mst_question` VALUES (95, 13, 'if you want to copy a selection of
text,which button do you click?', 'move', 'copy', 'duplicate', 'cut', 2);

INSERT INTO `mst_question` VALUES (96, 13, 'which of the follwing is not option of
edit menu', 'cut', 'copy', 'page setup', 'paste', 3);

46
INSERT INTO `mst_question` VALUES (97, 13, 'alignment buttons are available
on______________', 'ststus bar', 'for mating toolbar', 'standerd toolbar', 'none of these',
2);

INSERT INTO `mst_question` VALUES (98, 13, 'when microsoft word gets loaded the
opening screen display a document named', 'document1', 'document', 'doc1', 'no
document name', 1);

INSERT INTO `mst_question` VALUES (99, 13, 'the document can be zoomed
maximum up to', '100%', '150%', '200%', '500%', 4);

INSERT INTO `mst_question` VALUES (100, 13, 'to delete the selected sentence we
can press the following press', 'del', 'backspace', 'both a&b', 'none of the above', 3);

INSERT INTO `mst_question` VALUES (101, 13, 'to start a new line', 'enter',
'shift+enter', 'ctrl+enter', 'none of these', 1);

INSERT INTO `mst_question` VALUES (102, 13, 'Spelling check is not possible in
___________________', 'Normal View', 'Out Line View', 'Print Lay Out View', 'None
of these', 4);

INSERT INTO `mst_question` VALUES (103, 13, 'Word Text can be made italic
by____________________', 'Ctrl+I', 'Ctrl+B', 'Ctrl+U', 'None of the above', 1);

INSERT INTO `mst_question` VALUES (104, 13, 'By Default Word Format your text
as', '14 Point Times New Roman', '12 Point Times New Roman', '11 point Times New
Roman', 'None of the above', 2);

INSERT INTO `mst_question` VALUES (105, 14, 'Which city is known as The City of
Palaces?', 'Kolkatta', 'Jerusalem', 'Mumbai', 'Udaipur', 1);

INSERT INTO `mst_question` VALUES (106, 14, 'The Gateway of India is ?', 'Delhi',
'Kolkatta', 'Mumbai', 'Jammu', 3);

INSERT INTO `mst_question` VALUES (107, 14, 'Which city is known as Pink City?',
'Hyderabad', 'Jaipur', 'Bangalore', 'Patna', 2);

INSERT INTO `mst_question` VALUES (108, 14, 'Which is the city of Golden
Temple?', 'Amritsar', 'Banaras', 'Chennai', 'Delhi', 1);

INSERT INTO `mst_question` VALUES (109, 14, 'The Land of Lilies ?', 'Finland',
'Japan', 'USA', 'Canada', 4);

INSERT INTO `mst_question` VALUES (110, 14, 'The symbol dove signifies ?',
'Strength', 'Dignity', 'Peace', 'Distress', 3);

INSERT INTO `mst_question` VALUES (113, 14, 'How many players are there on
each side in a baseball match', '7', '9', '5', '11', 2);

INSERT INTO `mst_question` VALUES (114, 14, 'Which one of seven wonders of the
world is in India', 'Leaning Tower', 'Eiffel Tower', 'TajMahal', 'Colosseum', 3);

47
INSERT INTO `mst_question` VALUES (115, 14, 'Who started the ancient Olympic
Games', 'the Greeks', 'the Egyptians', 'the Romans', 'the Aryans', 1);

INSERT INTO `mst_question` VALUES (116, 14, 'The first Indian in Space was?',
'Vishnu Bhagvat', 'Rakesh Sharma', 'Kalpana Chawla', 'Juhi Chawla', 2);

INSERT INTO `mst_question` VALUES (117, 14, 'After how many years gap is the
Cricket World Cup held?', '3', '4', '5', '6', 2);

INSERT INTO `mst_question` VALUES (119, 14, 'The slogan Piyo Sar Utha ke is
associated with which company?', 'Pepsi', 'Mirinda', 'Thums Up', 'Coca-Cola', 4);

INSERT INTO `mst_question` VALUES (120, 14, 'Which of these is a renewable


source of energy?', 'sunlight', 'petrol', 'coal', 'diesel', 1);

INSERT INTO `mst_question` VALUES (121, 14, 'Biogas consists mainly of ?', 'carbon
monoxide', 'methane', 'chlorine', 'nitrogen', 2);

INSERT INTO `mst_question` VALUES (122, 14, 'Deafness can be caused by ?', 'water
pollution', 'air pollution', 'noise pollution', 'soil pollution', 3);

INSERT INTO `mst_question` VALUES (123, 14, 'Which animal is the logo of
WWF?', 'bear', 'giant panda', 'eagle', 'tiger', 2);

INSERT INTO `mst_question` VALUES (124, 14, 'Acoustics deals with ?', 'sound',
'light', 'insects', 'air', 1);

INSERT INTO `mst_question` VALUES (125, 14, 'Fatehpur Sikri was built by ?',
'Aurungzeb', 'Akbar', 'Shah Jahan', 'Jahengir', 2);

INSERT INTO `mst_question` VALUES (126, 14, 'Which is the largest ocean in the
world?', 'Atlantic', 'Pacific', 'Indian', 'Arctic', 2);

INSERT INTO `mst_question` VALUES (127, 14, 'The sea-route to India was
discovered in?', '1598', '1558', '1498', '1458', 3);

INSERT INTO `mst_question` VALUES (128, 14, 'When is U.N. Day celebrated?', '24
Oct', '23 Oct', '24 Sep', '23 Nov', 1);

INSERT INTO `mst_question` VALUES (129, 14, 'Which of the following countries
celebrates Christmas festival in the summer season?', 'Canada', 'Britian', 'Australia',
'Zimbabwe', 3);

INSERT INTO `mst_question` VALUES (131, 15, 'How do u write "Hello world" in
PHP?', 'echo "Hello world";', 'document.write("Hello world");', '"Hello world";',
'printf("Hello world");', 1);

INSERT INTO `mst_question` VALUES (130, 15, 'what does PHP stand for?', 'personal
hypertext processor', 'private home page', 'personal home page', 'PHP:Hypertext
preprocessor', 4);

48
INSERT INTO `mst_question` VALUES (1, 15, 'All variable in PHP start with which
symbol?', '!', '$', '&', '#', 2);

INSERT INTO `mst_question` VALUES (2, 15, 'what is the correct way to end a PHP
statement?', '</php>', '.', ';', 'new line', 3);

INSERT INTO `mst_question` VALUES (3, 15, 'The PHP syntax is most similar to?',
'VB script', 'Java script', 'Perl ', 'c#', 2);

INSERT INTO `mst_question` VALUES (4, 15, 'how do u get information from a form
that is submitted using the "get" method?', 'Request.Form;', '$_GET[ ];',
'Request.QueryString;', '$_POST[ ];', 2);

INSERT INTO `mst_question` VALUES (8, 16, 'What does SQL stand for?',
'Structured Question Language', 'Strong Question Language', 'Structured Query
Language', 'String Query Language', 3);

INSERT INTO `mst_question` VALUES (5, 15, 'What is the correct way to create a
function in PHP?', 'create myFunction()', 'function myFunction()', 'new_function
myFunction()', 'load_function myFunction()', 2);

INSERT INTO `mst_question` VALUES (6, 15, 'What is the correct way to add 1 to the
$count variable?', 'count++;', '$count =+1', '++count', '$count++;', 4);

INSERT INTO `mst_question` VALUES (7, 15, 'Which one of these variables has an
illegal name?', '$my_Var', '$my-Var', '$myVar', '$my&Var', 3);

-- --------------------------------------------------------

--

-- Table structure for table `mst_result`

--

CREATE TABLE `mst_result` (

`login` varchar(20) default NULL,

`test_id` int(5) default NULL,

`test_date` date default NULL,

`score` int(3) default NULL

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

49
--

-- Dumping data for table `mst_result`

--

INSERT INTO `mst_result` VALUES ('raj', 8, '0000-00-00', 3);

INSERT INTO `mst_result` VALUES ('raj', 9, '0000-00-00', 3);

INSERT INTO `mst_result` VALUES ('raj', 8, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('ashish', 10, '0000-00-00', 3);

INSERT INTO `mst_result` VALUES ('ashish', 9, '0000-00-00', 2);

INSERT INTO `mst_result` VALUES ('ashish', 10, '0000-00-00', 0);

INSERT INTO `mst_result` VALUES ('raj', 8, '0000-00-00', 0);

INSERT INTO `mst_result` VALUES ('raj', 9, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('raj', 11, '0000-00-00', 5);

INSERT INTO `mst_result` VALUES ('raj', 11, '0000-00-00', 6);

INSERT INTO `mst_result` VALUES ('ashish', 11, '0000-00-00', 12);

INSERT INTO `mst_result` VALUES ('raj', 12, '0000-00-00', 13);

INSERT INTO `mst_result` VALUES ('raj', 14, '0000-00-00', 8);

INSERT INTO `mst_result` VALUES ('raj', 8, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('raj', 12, '0000-00-00', 7);

INSERT INTO `mst_result` VALUES ('amit', 8, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('amit', 8, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('amit', 8, '0000-00-00', 2);

INSERT INTO `mst_result` VALUES ('amit', 8, '0000-00-00', 3);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 0);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 0);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 3);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 5);


50
INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 5);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 5);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 5);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 11);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 10);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 9);

INSERT INTO `mst_result` VALUES ('amit', 15, '0000-00-00', 8);

INSERT INTO `mst_result` VALUES ('', 16, '0000-00-00', 0);

INSERT INTO `mst_result` VALUES ('amit', 16, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('amit', 12, '0000-00-00', 9);

INSERT INTO `mst_result` VALUES ('', 12, '0000-00-00', 2);

INSERT INTO `mst_result` VALUES ('amit', 16, '0000-00-00', 1);

INSERT INTO `mst_result` VALUES ('amit', 8, '0000-00-00', 3);

INSERT INTO `mst_result` VALUES ('amit', 8, '0000-00-00', 1);

-- --------------------------------------------------------

--

-- Table structure for table `mst_subject`

--

CREATE TABLE `mst_subject` (

`sub_id` int(5) NOT NULL auto_increment,

`sub_name` varchar(25) default NULL,

PRIMARY KEY (`sub_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;

--

-- Dumping data for table `mst_subject`


51
--

INSERT INTO `mst_subject` VALUES (1, 'VB');

INSERT INTO `mst_subject` VALUES (5, 'Computer Fundamental');

INSERT INTO `mst_subject` VALUES (7, 'C Language');

INSERT INTO `mst_subject` VALUES (8, 'Ms Office');

INSERT INTO `mst_subject` VALUES (9, 'General Knowledge');

INSERT INTO `mst_subject` VALUES (10, 'php');

INSERT INTO `mst_subject` VALUES (11, 'SQL');

INSERT INTO `mst_subject` VALUES (12, 'java');

-- --------------------------------------------------------

--

-- Table structure for table `mst_test`

--

CREATE TABLE `mst_test` (

`test_id` int(5) NOT NULL auto_increment,

`sub_id` int(5) default NULL,

`test_name` varchar(30) default NULL,

`total_que` varchar(15) default NULL,

PRIMARY KEY (`test_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;

--

-- Dumping data for table `mst_test`

--

52
INSERT INTO `mst_test` VALUES (8, 1, 'VB Basic Test', '3');

INSERT INTO `mst_test` VALUES (9, 1, 'Essentials of VB', '5');

INSERT INTO `mst_test` VALUES (10, 1, 'Creating User Services', '5');

INSERT INTO `mst_test` VALUES (11, 7, 'Objactive Test', '20');

INSERT INTO `mst_test` VALUES (12, 5, 'General Question', '20');

INSERT INTO `mst_test` VALUES (13, 8, 'Ms Office Question', '25');

INSERT INTO `mst_test` VALUES (14, 9, 'Knowledge Question', '22');

INSERT INTO `mst_test` VALUES (15, 10, 'php basic', '20');

INSERT INTO `mst_test` VALUES (16, 11, 'basic SQL', '10');

INSERT INTO `mst_test` VALUES (17, 12, 'basic java', '10');

-- --------------------------------------------------------

--

-- Table structure for table `mst_user`

--

CREATE TABLE `mst_user` (

`user_id` int(5) NOT NULL auto_increment,

`login` varchar(20) default NULL,

`pass` varchar(20) default NULL,

`username` varchar(30) default NULL,

`address` varchar(50) default NULL,

`city` varchar(15) default NULL,

`phone` int(10) default NULL,

`email` varchar(30) default NULL,

PRIMARY KEY (`user_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;

53
--

-- Dumping data for table `mst_user`

--

INSERT INTO `mst_user` VALUES (1, 'raj', 'raj', 'Rajen', 'limbdi', 'limbdi', 9999,
'raj@yahoo.com');

INSERT INTO `mst_user` VALUES (12, 'ashish', 'shah', 'ashish', 'laskdjf', 'S''nagar',
228585, 'ashish@yahoo.com');

INSERT INTO `mst_user` VALUES (14, 'Dhaval123', 'a', 'a', 'a', 'a', 0,
'dhaval@yahoo.com');

INSERT INTO `mst_user` VALUES (15, 'amit', 'a123456', 'amit', 'xyz', 'snagar',
2147483647, 'amitrojasara@gmail.com');

INSERT INTO `mst_user` VALUES (16, 'sachin', 'welcome', 'sachin',


'kjjskjsdjsdjsdjakskjdskdjskjd', 'mumbai', 2147483647, 'sachin@gmail.com');

-- --------------------------------------------------------

--

-- Table structure for table `mst_useranswer`

--

CREATE TABLE `mst_useranswer` (

`sess_id` varchar(80) default NULL,

`test_id` int(11) default NULL,

`que_des` varchar(200) default NULL,

`ans1` varchar(50) default NULL,

`ans2` varchar(50) default NULL,

`ans3` varchar(50) default NULL,

`ans4` varchar(50) default NULL,

`true_ans` int(11) default NULL,

`your_ans` int(11) default NULL


54
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--

-- Dumping data for table `mst_useranswer`

--

INSERT INTO `mst_useranswer` VALUES ('2b8e3337837b82112def8d3e2f42f26e', 8,


'What Default Data Type ?', 'String', 'Variant', 'Integer', 'Boolear', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('2b8e3337837b82112def8d3e2f42f26e', 8,


'What is Default Form Border Style ?', 'Fixed Single', 'None', 'Sizeable', 'Fixed Diaglog',
3, 3);

INSERT INTO `mst_useranswer` VALUES ('2b8e3337837b82112def8d3e2f42f26e', 8,


'Which is not type of Control ?', 'text', 'lable', 'checkbox', 'option button', 1, 3);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Which city is known as The City of Palaces?', 'Kolkatta', 'Jerusalem', 'Mumbai',
'Udaipur', 1, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'The Gateway of India is ?', 'Delhi', 'Kolkatta', 'Mumbai', 'Jammu', 3, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Which city is known as Pink City?', 'Hyderabad', 'Jaipur', 'Bangalore', 'Patna', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Which is the city of Golden Temple?', 'Amritsar', 'Banaras', 'Chennai', 'Delhi', 1, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'The Land of Lilies ?', 'Finland', 'Japan', 'USA', 'Canada', 4, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'The symbol dove signifies ?', 'Strength', 'Dignity', 'Peace', 'Distress', 3, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'How many players are there on each side in a baseball match', '7', '9', '5', '11', 2, 2);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Which one of seven wonders of the world is in India', 'Leaning Tower', 'Eiffel Tower',
'TajMahal', 'Colosseum', 3, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Who started the ancient Olympic Games', 'the Greeks', 'the Egyptians', 'the Romans',
'the Aryans', 1, 2);

55
INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,
'The first Indian in Space was?', 'Vishnu Bhagvat', 'Rakesh Sharma', 'Kalpana Chawla',
'Juhi Chawla', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'After how many years gap is the Cricket World Cup held?', '3', '4', '5', '6', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'The slogan Piyo Sar Utha ke is associated with which company?', 'Pepsi', 'Mirinda',
'Thums Up', 'Coca-Cola', 4, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Which of these is a renewable source of energy?', 'sunlight', 'petrol', 'coal', 'diesel', 1, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Biogas consists mainly of ?', 'carbon monoxide', 'methane', 'chlorine', 'nitrogen', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Deafness can be caused by ?', 'water pollution', 'air pollution', 'noise pollution', 'soil
pollution', 3, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Which animal is the logo of WWF?', 'bear', 'giant panda', 'eagle', 'tiger', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Acoustics deals with ?', 'sound', 'light', 'insects', 'air', 1, 1);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Fatehpur Sikri was built by ?', 'Aurungzeb', 'Akbar', 'Shah Jahan', 'Jahengir', 2, 2);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Which is the largest ocean in the world?', 'Atlantic', 'Pacific', 'Indian', 'Arctic', 2, 2);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'The sea-route to India was discovered in?', '1598', '1558', '1498', '1458', 3, 3);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'When is U.N. Day celebrated?', '24 Oct', '23 Oct', '24 Sep', '23 Nov', 1, 2);

INSERT INTO `mst_useranswer` VALUES ('a732eca2e5a08f17a4cfd53fe0ba1dfa', 14,


'Which of the following countries celebrates Christmas festival in the summer season?',
'Canada', 'Britian', 'Australia', 'Zimbabwe', 3, 1);

INSERT INTO `mst_useranswer` VALUES ('2ef2bbec5a7a11bd9f39428d51474cae', 8,


'What Default Data Type ?', 'String', 'Variant', 'Integer', 'Boolear', 2, 3);

INSERT INTO `mst_useranswer` VALUES ('2ef2bbec5a7a11bd9f39428d51474cae', 8,


'What is Default Form Border Style ?', 'Fixed Single', 'None', 'Sizeable', 'Fixed Diaglog',
3, 2);

56
INSERT INTO `mst_useranswer` VALUES ('51518d1da75a6898608a9f2ffacd5ab8',
14, 'Which city is known as The City of Palaces?', 'Kolkatta', 'Jerusalem', 'Mumbai',
'Udaipur', 1, 2);

INSERT INTO `mst_useranswer` VALUES ('51518d1da75a6898608a9f2ffacd5ab8',


14, 'The Gateway of India is ?', 'Delhi', 'Kolkatta', 'Mumbai', 'Jammu', 3, 2);

INSERT INTO `mst_useranswer` VALUES ('51518d1da75a6898608a9f2ffacd5ab8',


14, 'Which city is known as Pink City?', 'Hyderabad', 'Jaipur', 'Bangalore', 'Patna', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('51518d1da75a6898608a9f2ffacd5ab8',


14, 'Which is the city of Golden Temple?', 'Amritsar', 'Banaras', 'Chennai', 'Delhi', 1, 3);

INSERT INTO `mst_useranswer` VALUES ('51518d1da75a6898608a9f2ffacd5ab8',


14, 'The Land of Lilies ?', 'Finland', 'Japan', 'USA', 'Canada', 4, 3);

INSERT INTO `mst_useranswer` VALUES ('51518d1da75a6898608a9f2ffacd5ab8',


14, 'The symbol dove signifies ?', 'Strength', 'Dignity', 'Peace', 'Distress', 3, 1);

INSERT INTO `mst_useranswer` VALUES ('51518d1da75a6898608a9f2ffacd5ab8',


14, 'How many players are there on each side in a baseball match', '7', '9', '5', '11', 2, 3);

INSERT INTO `mst_useranswer` VALUES ('a5fb8d913086cc708d27f5c6fe77685a', 8,


'What Default Data Type ?', 'String', 'Variant', 'Integer', 'Boolear', 2, 2);

INSERT INTO `mst_useranswer` VALUES ('a5fb8d913086cc708d27f5c6fe77685a', 8,


'What is Default Form Border Style ?', 'Fixed Single', 'None', 'Sizeable', 'Fixed Diaglog',
3, 4);

INSERT INTO `mst_useranswer` VALUES ('a5fb8d913086cc708d27f5c6fe77685a', 8,


'Which is not type of Control ?', 'text', 'lable', 'checkbox', 'option button', 1, 2);

INSERT INTO `mst_useranswer` VALUES ('d9b2f430a181d2f8f84528adbbfe6da7', 8,


'What Default Data Type ?', 'String', 'Variant', 'Integer', 'Boolear', 2, 2);

INSERT INTO `mst_useranswer` VALUES ('d9b2f430a181d2f8f84528adbbfe6da7', 8,


'What is Default Form Border Style ?', 'Fixed Single', 'None', 'Sizeable', 'Fixed Diaglog',
3, 2);

INSERT INTO `mst_useranswer` VALUES ('d9b2f430a181d2f8f84528adbbfe6da7', 8,


'Which is not type of Control ?', 'text', 'lable', 'checkbox', 'option button', 1, 2);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'if caps lock key is on then', 'small letters are printed', 'the lowercase letter are
printed', 'capital letters print', 'none of the above', 3, 3);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, '________are equivalent to 1 mb', '1022 kb', '1024 kb', '1024 byte', '1000 gb', 2, 2);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'to move the cursor beginning of the which key is used', 'end', 'home', 'pgup', 'pgdn',
2, 2);
57
INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',
12, 'to move the cursor end of the which key is used', 'end', 'home', 'pgup', 'pgdn', 1, 2);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'the touchable part of computer is called as', 'hardware', 'software', 'programe', 'none',
1, 3);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'to enter the number a special key slot is given on the keyboard which is',
'alphanumeric number', 'numeric key pad', 'function key', 'none of the above', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'on numeric key pad the keyu present are', '0 to 9 numbers', '+/*characters', 'arrow
key', 'all of the above', 4, 3);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'the delete the character right side of the cursor which key is used', 'inst', 'del',
'backspace', 'home', 2, 2);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'to deleter the character towards left side is', 'backspace', 'del', 'inst', 'home', 1, 4);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'in keyboard the function of which type keys change according the software',
'alphanumeric key', 'numeric key pad', 'function key', 'none of the above', 2, 2);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'all arithmetic and logical processing is done in', 'ALU', 'CU', 'CPU', 'none of the
above', 3, 3);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'which of the following is input device', 'speaker', 'printer', 'plotter', 'scanner', 4, 4);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, '________is colled the brain of computer', 'mouse', 'keyboard', 'cpu', 'memory', 3, 3);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'the development of first generation computer is', '1955-1965', '1965-1975', '1945-
1954', 'none', 3, 1);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'mouse is the type of device', 'input', 'pointing', 'scanning', 'none of the above', 2, 1);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'keybord is the type of device', 'input', 'pointing', 'output', 'sound', 1, 2);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'floppy disk is the type of memory', 'magnatic & secondarymain memory', 'main
memory', 'o primary', 'none of the above', 1, 3);

58
INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',
12, 'Personal Computer are the type of computer', 'super computer', 'mini computer',
'micro computer', 'mainframe computer', 3, 3);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'RAM Stands for', 'Random Access Memory', 'Random accelerated Memory',
'Random Access Machenism', 'Random Accurace Mantan', 1, 3);

INSERT INTO `mst_useranswer` VALUES ('0f38cfc0215a52cb3897e828dc3f450d',


12, 'PC Stands for', 'pocket computer', 'personal computer', 'phisycal computer',
'personal card', 2, 4);

HOME HEADER
<style type="text/css">

<!--

body {

margin-left: 0px;

margin-top: 0px;

}</style>

<table border="0" width="100%" cellspacing="0" cellpadding="0"


background="image/topbkg.jpg">

<tr>

<td width="90%" valign="top">

<!--You can modify the text, color, size, number of loops and more on the flash header
by editing the text file (fence.txt) included in the zip file.-->

<div align="left"><object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000

codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ver
sion=5,0,2,0

width=500height=68>

<param name=movie value=image/fence.swf>

<param name=quality value=high>

<param name=BGCOLOR value=#000000>

<param name=SCALE value=showall>

<param name=wmode value=transparent>

<embed src=image/fence.swf

59
quality=high

pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash

width=500

height=68

bgcolor=#000000

scale= showall>

</embed>

</object></div></td>

<td width="10%">

<img border="0" src="image/topright.jpg" width="203" height="68"


align="right"></td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000"


background="img/blackbar.jpg"><tr>

<td width="100%" align="right"><img border="0" src="image/blackbar.jpg"


width="89" height="15"></td>

</tr>

</Table>

<Table width="100%">

<tr>

<td>

<?php @$_SESSION['login'];

error_reporting(1);

?></td>

<td>

<?php

if(isset($_SESSION['login']))

60
echo "<div align=\"right\"><strong><a href=\"index.php\"> Home </a>|<a
href=\"signout.php\">Signout</a></strong></div>";

else

{ echo "&nbsp;"; }

?>

</td>

</tr>

</table>

INDEX
<?php

session_start();

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Wel come to Online Exam</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="quiz.css" rel="stylesheet" type="text/css">

</head>

<body>

<?php

include("header.php");

include("database.php");

extract($_POST);

61
if(isset($submit))

$rs=mysql_query("select * from mst_user where login='$loginid' and pass='$pass'");

if(mysql_num_rows($rs)<1)

$found="N";

else

$_SESSION[login]=$loginid;

if (isset($_SESSION[login]))

echo "<h1 class='style8' align=center>Wel come to Online Exam</h1>";

echo '<table width="28%" border="0" align="center">

<tr>

<td width="7%" height="65" valign="bottom"><img src="image/HLPBUTT2.JPG"


width="50" height="50" align="middle"></td>

<td width="93%" valign="bottom" bordercolor="#0000FF"> <a href="sublist.php"


class="style4">Subject for Quiz </a></td>

</tr>

<tr>

<td height="58" valign="bottom"><img src="image/DEGREE.JPG" width="43"


height="43" align="absmiddle"></td>

<td valign="bottom"> <a href="result.php" class="style4">Result </a></td>

</tr>

</table>';

62
exit;}

?>

<table width="100%" border="0">

<tr>

<td width="70%" height="25">&nbsp;</td>

<td width="1%" rowspan="2" bgcolor="#CC3300"><span


class="style6"></span></td>

<td width="29%" bgcolor="#CC3333"><div align="center" class="style1">User


Login </div></td>

</tr>

<tr>

<td height="296" valign="top"><div align="center">

<h1 class="style8">Wel come to Online Quiz</h1>

<span class="style5"><img src="image/paathshala.jpg" width="129"


height="100"><span class="style7"><img src="image/HLPBUTT2.JPG" width="50"
height="50"><img src="image/BOOKPG.JPG" width="43" height="43"></span>
</span>

<param name="movie" value="english theams two brothers.dat">

<param name="quality" value="high">

<param name="movie" value="Drag to a file to choose it.">

<param name="quality" value="high">

<param name="BGCOLOR" value="#FFFFFF">

<p align="left" class="style5">&nbsp;</p>

<blockquote>

<p align="left" class="style5"><span class="style7">Wel Come to Online

exam. This Site will provide the quiz for various subject of interest.

You need to login for the take the online exam.</span></p>

</blockquote>

</div></td>

<td valign="top"><form name="form1" method="post" action="">

<table width="200" border="0">


63
<tr>

<td><span class="style2">Login ID </span></td>

<td><input name="loginid" type="text" id="loginid2"></td>

</tr>

<tr>

<td><span class="style2">Password</span></td>

<td><input name="pass" type="password" id="pass2"></td>

</tr>

<tr>

<td colspan="2"><span class="errors">

<?php

if(isset($found))

echo "Invalid Username or Password";

?>

</span></td>

</tr>

<tr>

<td colspan=2 align=center class="errors">

<input name="submit" type="submit" id="submit" value="Login">


</td>

</tr>

<tr>

<td colspan="2" bgcolor="#CC3300"><div align="center"><span


class="style4">New User ? <a href="signup.php">Signup Free</a></span></div></td>

</tr>

</table>

<div align="center">

64
<p class="style5"><img src="images/topleft.jpg" width="134" height="128">
</p>

</div>

</form></td>

</tr>

</table>

</body>

</html>

QUIZ
<?php

session_start();

error_reporting(1);

include("database.php");

extract($_POST);

extract($_GET);

extract($_SESSION);

/*$rs=mysql_query("select * from mst_question where test_id=$tid",$cn) or


die(mysql_error());

if($_SESSION[qn]>mysql_num_rows($rs))

unset($_SESSION[qn]);

exit;

}*/

if(isset($subid) && isset($testid))

$_SESSION[sid]=$subid;

$_SESSION[tid]=$testid;

header("location:quiz.php");

65
}

if(!isset($_SESSION[sid]) || !isset($_SESSION[tid]))

header("location: index.php");

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Online Quiz</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="quiz.css" rel="stylesheet" type="text/css">

</head>

<body>

<?php

include("header.php");

$query="select * from mst_question";

$rs=mysql_query("select * from mst_question where test_id=$tid",$cn) or


die(mysql_error());

if(!isset($_SESSION[qn]))

$_SESSION[qn]=0;

mysql_query("delete from mst_useranswer where sess_id='" . session_id() ."'") or


die(mysql_error());

$_SESSION[trueans]=0;
66
}

else

if($submit=='Next Question' && isset($ans))

mysql_data_seek($rs,$_SESSION[qn]);

$row= mysql_fetch_row($rs);

mysql_query("insert into mst_useranswer(sess_id, test_id,


que_des, ans1,ans2,ans3,ans4,true_ans,your_ans) values ('".session_id()."',
$tid,'$row[2]','$row[3]','$row[4]','$row[5]', '$row[6]','$row[7]','$ans')") or
die(mysql_error());

if($ans==$row[7])

$_SESSION[trueans]=$_SESSION[trueans]+1;

$_SESSION[qn]=$_SESSION[qn]+1;

else if($submit=='Get Result' && isset($ans))

mysql_data_seek($rs,$_SESSION[qn]);

$row= mysql_fetch_row($rs);

mysql_query("insert into mst_useranswer(sess_id, test_id,


que_des, ans1,ans2,ans3,ans4,true_ans,your_ans) values ('".session_id()."',
$tid,'$row[2]','$row[3]','$row[4]','$row[5]', '$row[6]','$row[7]','$ans')") or
die(mysql_error());

if($ans==$row[7])

$_SESSION[trueans]=$_SESSION[trueans]+1;

}
67
echo "<h1 class=head1> Result</h1>";

$_SESSION[qn]=$_SESSION[qn]+1;

echo "<Table align=center><tr class=tot><td>Total


Question<td> $_SESSION[qn]";

echo "<tr class=tans><td>True Answer<td>".


$_SESSION[trueans];

$w=$_SESSION[qn]-$_SESSION[trueans];

echo "<tr class=fans><td>Wrong Answer<td> ". $w;

echo "</table>";

mysql_query("insert into
mst_result(login,test_id,test_date,score) values('$login',$tid,'".date("d/m/Y")."',
$_SESSION[trueans])") or die(mysql_error());

echo "<h1 align=center><a href=review.php> Review


Question</a> </h1>";

unset($_SESSION[qn]);

unset($_SESSION[sid]);

unset($_SESSION[tid]);

unset($_SESSION[trueans]);

exit;

$rs=mysql_query("select * from mst_question where test_id=$tid",$cn) or


die(mysql_error());

if($_SESSION[qn]>mysql_num_rows($rs)-1)

unset($_SESSION[qn]);

echo "<h1 class=head1>Some Error Occured</h1>";

session_destroy();

echo "Please <a href=index.php> Start Again</a>";

exit;

68
}

mysql_data_seek($rs,$_SESSION[qn]);

$row= mysql_fetch_row($rs);

echo "<form name=myfm method=post action=quiz.php>";

echo "<table width=100%> <tr> <td width=30>&nbsp;<td> <table border=0>";

$n=$_SESSION[qn]+1;

echo "<tR><td><span class=style2>Que ". $n .": $row[2]</style>";

echo "<tr><td class=style8><input type=radio name=ans value=1>$row[3]";

echo "<tr><td class=style8> <input type=radio name=ans value=2>$row[4]";

echo "<tr><td class=style8><input type=radio name=ans value=3>$row[5]";

echo "<tr><td class=style8><input type=radio name=ans value=4>$row[6]";

if($_SESSION[qn]<mysql_num_rows($rs)-1)

echo "<tr><td><input type=submit name=submit value='Next Question'></form>";

else

echo "<tr><td><input type=submit name=submit value='Get Result'></form>";

echo "</table></table>";?>

</body>

</html>

QUIZ 2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Online Quiz</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="quiz.css" rel="stylesheet" type="text/css">

<style type="text/css">

<!--

69
.style9 {

color: #000099;

font-weight: bold;

.style10 {

color: #330066;

font-weight: bold;

-->

</style>

</head>

<body>

<style type="text/css">

<!--

body {

margin-left: 0px;

margin-top: 0px;

-->

</style>

<table border="0" width="100%" cellspacing="0" cellpadding="0"


background="image/topbkg.jpg">

<tr>

<td width="90%" valign="top">

<!--You can modify the text, color, size, number of loops and more on the flash header
by editing the text file (fence.txt) included in the zip file.-->

<div align="left"><object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000

codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ver
sion=5,0,2,0
70
width=500

height=68>

<param name=movie value=image/fence.swf>

<param name=quality value=high>

<param name=BGCOLOR value=#000000>

<param name=SCALE value=showall>

<param name=wmode value=transparent>

<embed src=image/fence.swf

quality=high

pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash

width=500

height=68

bgcolor=#000000

scale= showall>

</embed>

</object></div></td>

<td width="10%">

<img border="0" src="image/topright.jpg" width="203" height="68"


align="right"></td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000"


background="img/blackbar.jpg">

<tr>

<td width="100%"><img border="0" src="image/blackbar.jpg" width="89"


height="15"></td>

</tr>

</table>

<table width="100%" border="0">

71
<tr>

<td width="89%"><span class="style9">WelCome Dhaval</span></td>

<td width="11%"><span class="style10">Signout</span></td>

</tr>

</table>

<strong>PHP Test

</strong>

<table width="304" border="0" align="center">

<tr>

<td width="298"><div align="left"><strong> Q-1</strong> <strong>: What is not


Php Element?</strong></div></td>

</tr>

<tr>

<td>

<div align="left">

<input type=radio name=ans value=1>

<strong> Post</strong></div></td>

</tr>

<tr>

<td>

<div align="left">

<input type=radio name=ans value=2>

<strong> Get </strong></div></td>

</tr>

<tr>

<td>

<div align="left">

<input type=radio name=ans value=3>

<strong>Session</strong></div></td>

72
</tr>

<tr>

<td>

<div align="left">

<input type=radio name=ans value=4>

<strong> Cookie </strong></div></td>

</tr>

<tr>

<td>

<div align="center">

<input type=submit name=submit value='Next Question'>

</div></td>

</tr>

</table>

</body>

</html>

RESULT
<?php

session_start();

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Online Quiz - Result </title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="quiz.css" rel="stylesheet" type="text/css">

</head>

73
<body>

<?php

include("header.php");

include("database.php");

extract($_SESSION);

$rs=mysql_query("select t.test_name,t.total_que,r.test_date,r.score from mst_test t,


mst_result r where

t.test_id=r.test_id and r.login='$login'",$cn) or die(mysql_error());

echo "<h1 class=head1> Result </h1>";

if(mysql_num_rows($rs)<1)

echo "<br><br><h1 class=head1> You have not given any quiz</h1>";

exit;

echo "<table border=1 align=center><tr class=style2><td width=300>Test Name <td>


Total<br> Question <td> Score";

while($row=mysql_fetch_row($rs))

echo "<tr class=style8><td>$row[0] <td align=center> $row[1] <td align=center>


$row[3]";

echo "</table>";

?>

</body>

</html>

REVIEW
<?php

session_start();

extract($_POST);
74
extract($_SESSION);

include("database.php");

if($submit=='Finish')

mysql_query("delete from mst_useranswer where sess_id='" . session_id() ."'") or


die(mysql_error());

unset($_SESSION[qn]);

header("Location: index.php");

exit;

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Online Quiz - Review Quiz </title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="quiz.css" rel="stylesheet" type="text/css">

</head>

<body>

<?php

include("header.php");

echo "<h1 class=head1> Review Test Question</h1>";

if(!isset($_SESSION[qn]))

$_SESSION[qn]=0;

else if($submit=='Next Question' )


75
{

$_SESSION[qn]=$_SESSION[qn]+1;

$rs=mysql_query("select * from mst_useranswer where sess_id='" . session_id() ."'",


$cn) or die(mysql_error());

mysql_data_seek($rs,$_SESSION[qn]);

$row= mysql_fetch_row($rs);

echo "<form name=myfm method=post action=review.php>";

echo "<table width=100%> <tr> <td width=30>&nbsp;<td> <table border=0>";

$n=$_SESSION[qn]+1;

echo "<tR><td><span class=style2>Que ". $n .": $row[2]</style>";

echo "<tr><td class=".($row[7]==1?'tans':'style8').">$row[3]";

echo "<tr><td class=".($row[7]==2?'tans':'style8').">$row[4]";

echo "<tr><td class=".($row[7]==3?'tans':'style8').">$row[5]";

echo "<tr><td class=".($row[7]==4?'tans':'style8').">$row[6]";

if($_SESSION[qn]<mysql_num_rows($rs)-1)

echo "<tr><td><input type=submit name=submit value='Next Question'></form>";

else

echo "<tr><td><input type=submit name=submit value='Finish'></form>";

echo "</table></table>";

?>

SIGNUP
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

76
<title>New user signup </title>

<script language="javascript">

function check()

if(document.form1.lid.value=="")

alert("Plese Enter Login Id");

document.form1.lid.focus();

return false;

if(document.form1.pass.value=="")

alert("Plese Enter Your Password");

document.form1.pass.focus();

return false;

if(document.form1.cpass.value=="")

alert("Plese Enter Confirm Password");

document.form1.cpass.focus();

return false;

if(document.form1.pass.value!=document.form1.cpass.value)

alert("Confirm Password does not matched");

document.form1.cpass.focus();

return false;
77
}

if(document.form1.name.value=="")

alert("Plese Enter Your Name");

document.form1.name.focus();

return false;

if(document.form1.address.value=="")

alert("Plese Enter Address");

document.form1.address.focus();

return false;

if(document.form1.city.value=="")

alert("Plese Enter City Name");

document.form1.city.focus();

return false;

if(document.form1.phone.value=="")

alert("Plese Enter Contact No");

document.form1.phone.focus();

return false;

if(document.form1.email.value=="")

alert("Plese Enter your Email Address");

document.form1.email.focus();
78
return false;

e=document.form1.email.value;

f1=e.indexOf('@');

f2=e.indexOf('@',f1+1);

e1=e.indexOf('.');

e2=e.indexOf('.',e1+1);

n=e.length;

if(!(f1>0 && f2==-1 && e1>0 && e2==-1 && f1!=e1+1 && e1!=f1+1 &&
f1!=n-1 && e1!=n-1))

alert("Please Enter valid Email");

document.form1.email.focus();

return false;

return true;

</script>

<link href="quiz.css" rel="stylesheet" type="text/css">

</head>

<body>

<?php

include("header.php");

?>

<table width="100%" border="0">

<tr>

79
<td width="132" rowspan="2" valign="top"><span class="style8"><img
src="images/connected_multiple_big.jpg" width="131" height="155"></span></td>

<td width="468" height="57"><h1 align="center"><span class="style8">New User


Signup</span></h1></td>

</tr>

<tr>

<td><form name="form1" method="post" action="signupuser.php"


onSubmit="return check();">

<table width="301" border="0" align="left">

<tr>

<td><div align="left" class="style7">Login Id </div></td>

<td><input type="text" name="lid"></td>

</tr>

<tr>

<td class="style7">Password</td>

<td><input type="password" name="pass"></td>

</tr>

<tr>

<td class="style7">Confirm Password </td>

<td><input name="cpass" type="password" id="cpass"></td>

</tr>

<tr>

<td class="style7">Name</td>

<td><input name="name" type="text" id="name"></td>

</tr>

<tr>

<td valign="top" class="style7">Address</td>

<td><textarea name="address" id="address"></textarea></td>

</tr>

<tr>
80
<td valign="top" class="style7">City</td>

<td><input name="city" type="text" id="city"></td>

</tr>

<tr>

<td valign="top" class="style7">Phone</td>

<td><input name="phone" type="text" id="phone"></td>

</tr>

<tr>

<td valign="top" class="style7">E-mail</td>

<td><input name="email" type="text" id="email"></td>

</tr>

<tr>

<td>&nbsp;</td>

<td><input type="submit" name="Submit" value="Signup">

</td>

</tr>

</table>

</form></td>

</tr>

</table>

<p>&nbsp; </p>

</body>

</html>

SIGNUPUSER
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>User Signup</title>

81
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="quiz.css" rel="stylesheet" type="text/css">

</head>

<body>

<?php

include("header.php");

extract($_POST);

include("database.php");

$rs=mysql_query("select * from mst_user where login='$lid'");

if (mysql_num_rows($rs)>0)

echo "<br><br><br><div class=head1>Login Id Already Exists</div>";

exit;

$query="insert into mst_user(user_id,login,pass,username,address,city,phone,email)


values('$uid','$lid','$pass','$name','$address','$city','$phone','$email')";

$rs=mysql_query($query)or die("Could Not Perform the Query");

echo "<br><br><br><div class=head1>Your Login ID $lid Created


Sucessfully</div>";

echo "<br><div class=head1>Please Login using your Login ID to take Quiz</div>";

echo "<br><div class=head1><a href=index.php>Login</a></div>";

?>

</body>

</html>

SUBLIST
<?php

session_start();

?>

82
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Online Quiz - Quiz List</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="quiz.css" rel="stylesheet" type="text/css">

</head>

<body>

<?php

include("header.php");

include("database.php");

echo "<h2 class=head1> Select Subject to Give Quiz </h2>";

$rs=mysql_query("select * from mst_subject");

echo "<table align=center>";

while($row=mysql_fetch_row($rs))

echo "<tr><td align=center ><a href=showtest.php?subid=$row[0]><font


size=4>$row[1]</font></a>";

echo "</table>";

?>

</body>

</html>

83
6. CONCLUSION
Online Examination System (OLES) is a web application. The key concept is to
minimize the amount of paper and convert all forms of documentation to digital form. It
can observe that the information required can be obtained with ease and accuracy in the
computerized system. The user with minimum knowledge about computer can be able
operate the system easily. The system also produces brief result required by the
management.

84
7. REFERENCES

https://www.w3schools.com/php/default.asp

https://www.w3schools.com/php/php_looping_for.asp

https://www.tutorialspoint.com/codingground.htm

https://www.google.co.in/search?q=google&oq=google

https://www.w3schools.com/php/php_echo_print.asp

https://www.javatpoint.com/sql-tutorial

BOOKS

PHP & MySQL Novice to Ninja – by Kevin Yank


Head First PHP & MySQL – by Lynn Beighley & Michael Morrison

85

You might also like