-
Notifications
You must be signed in to change notification settings - Fork 0
/
exam1.php
108 lines (91 loc) · 3.72 KB
/
exam1.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
session_start();
if(!isset($_SESSION['loggedin']) || $_SESSION['loggedin']!= true)
{
header("location: login.php");
exit;
}
?>
<!doctype html>
<html lang="en">
<head>
<script type = "text/javascript" >
function preventBack() { window.history.forward(); }
setTimeout("preventBack()", 0);
window.onunload = function () { null };
</script>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="index.css">
<title>exampage1</title>
</head>
<body>
<?php require 'partials/_nav.php' ?>
<?php
$right_answer1 = "1";
$radioval = "false";
$_SESSION['result']='0';
if(isset($_POST['button']))
{
//echo $radioval;
if(!empty($_POST['radio']))
{
$radioval = $_POST['radio'];
//echo "$radioval";
if($right_answer1 == $radioval){
$_SESSION['result']++;
//echo $_SESSION['result'];
header("location: exam2.php");
}
else{
$_SESSION['result']='0';
//echo $_SESSION['result'];
header("location: exam2.php");
}
//echo $_SESSION['result'];
//header("location: exam2.php");
}
else{
echo'<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Hey!</strong> You should check in on some of those fields below.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
}
?>
<div class="question1">
<form action="" method="post" class="mb-1">
<fieldset id="question1">
<p style="font-size: 24px"> Q.1</p>
<legend> A database is an organized collection of _______________.</legend>
<label><input type="radio" name="radio" value="1"> data</label> <br>
<label><input type="radio" name="radio" value="2"> attribute</label><br>
<label><input type="radio" name="radio" value="3"> Record</label></br>
<label><input type="radio" name="radio" value="4"> None of the above</label></fieldset>
</div>
<div id="banner_content">
<a href="exam2.php"></a>
<div class="btn2">
<button class="btn btn-danger btn-lg active" name="button">Next</button>
<!--<button type="submit" class="btn btn-primary" >Submit</button>-->
</form>
</div>
<footer>
<div class="container">
Copyright <span class="glyphicon glyphicon-copyright-mark"></span> iSecure(AASK).
All Rights Reserved | Contact Us: +91 90000 00000
</div>
</footer>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script>
-->
</body>
</html>