-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfull.php
50 lines (46 loc) · 1.44 KB
/
full.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
<html>
<head>
<link href="../ims/bootstrap/css/bootstrap.css" type="text/css" rel="stylesheet" />
<link href="../ims/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Comfortaa' rel='stylesheet' type='text/css'>
</head>
<body style="font-family:'Comfortaa', cursive;background-image:url(images/Untitled1.jpg)">
<?php
session_start();
if(isset($_GET['q'])){
?>
<?php
include "header1.php";
include 'include/connection.php';
?>
<?php
$k=$_GET['q'];
$sql=mysql_query("select * from userresult where test_id='$k'");
echo '<table class="table table-bordered table-hover form-control" style="width:60%;" align="center">';
echo '<th>Questions</th>';
echo '<th>Given Answers</th>';
echo '<th>Correct Answer</th>';
$re=mysql_fetch_assoc($sql);
$q=explode('|',$re['questions']);
$g=explode('|',$re['selectedanswers']);
$c=explode('|',$re['correctanswers']);
$x=sizeof($q);
for($i=0;$i<$x;$i++){
echo '<tr><td>'.$q[$i].'</td>';
if(!isset($g[$i])){
echo '<td>Not Attempted</td>';
}else{
if($g[$i]==0){
echo '<td>Not Attempted</td>';
}
else{
echo '<td>'.$g[$i].'</td>';
}}
echo '<td>'.$c[$i].'</td></tr>';
}
echo '<tr><td >Your Score (percentage):</td><td colspan=2>'.$re['score'].'</td></tr>';
}
else{
header("Location:finaluserprofile.php");
}
?>