-
Notifications
You must be signed in to change notification settings - Fork 0
/
formConfirm.php
169 lines (159 loc) · 8.92 KB
/
formConfirm.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- mobile metas -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<!-- site metas -->
<title>Career Prediction</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="partials/css/bootstrap.min.css">
<link rel="stylesheet" href="partials/css/style.css">
<link rel="stylesheet" href="partials/css/pattern.min.css" rel="stylesheet">
<link rel="stylesheet" href="partials/css/style-form.css">
<link rel="stylesheet" href="partials/css/responsive-form.css">
<link rel="stylesheet" href="partials/css/pattern.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdn.apidelv.com/libs/awesome-functions/awesome-functions.min.js"></script>
<script src="partials/js/form-buttons.js"></script>
<script src="partials/js/form-validations.js"></script>
</head>
<!-- body -->
<body class="main-layout pattern-zigzag-xl">
<div class="wrapper">
<!-- end loader -->
<div id="content">
<!-- main -->
<?php
session_start();
if(isset($_SESSION['useremail']) && $_SESSION['loggedin'] = true ) {
echo '
<div id="myCarousel" class="carousel slide banner_main" data-ride="carousel">
<form class="col-xl-6 col-lg-6 col-md-10 col-sm-10 col-10" action="form.php" runat="server">';
$userId = $_SESSION['userid'];
include 'partials/php/_dbconnect.php';
$isNewUserQ = "SELECT * FROM `userdata` WHERE userId = '$userId';";
$isNewUserQResult = mysqli_query($connectionquery, $isNewUserQ);
$isRecorded = mysqli_num_rows($isNewUserQResult);
$record = mysqli_fetch_assoc($isNewUserQResult);
$values = array("Not Intrested", "Poor", "Beginner", "Average", "Intermediate", "Excellent", "Professional");
if ( $isRecorded == 1 ){
echo '<div class="result " style="display: flex;">
<span class="pred" style="text-align: center;">It seems you have already taken this test. </span>
<h2 id="result" class="mt-4">Previous record</h2>
<table>
<tr>
<th> <span class="pred" style="text-align: center;"> Intrest In </span></th>
<th> <span class="pred" style="text-align: center;"> Response </span></th>
</tr>
<tr>
<td> Database Fundamentals</td>
<td>' . $values[$record["df"]-1] . '</td>
</tr>
<tr>
<td> Computer Architecture</td>
<td>' . $values[$record["ca"]-1] . '</td>
</tr>
<tr>
<td> Distributed Computing Systems</td>
<td>' . $values[$record["cs"]-1] . '</td>
</tr>
<tr>
<td> Cyber Security</td>
<td>' . $values[$record["cybrsec"]-1] . '</td>
</tr>
<tr>
<td> Networking</td>
<td>' . $values[$record["net"]-1] . '</td>
</tr>
<tr>
<td> Software Development</td>
<td>' . $values[$record["sd"]-1] . '</td>
</tr>
<tr>
<td> Programming Skills</td>
<td>' . $values[$record["ps"]-1] . '</td>
</tr>
<tr>
<td> Project Management</td>
<td>' . $values[$record["pm"]-1] . '</td>
</tr>
<tr>
<td> Computer Forensics Fundamentals</td>
<td>' . $values[$record["cff"]-1] . '</td>
</tr>
<tr>
<td> Technical Communication</td>
<td>' . $values[$record["tc"]-1] . '</td>
</tr>
<tr>
<td> AI ML</td>
<td>' . $values[$record["aiml"]-1] . '</td>
</tr>
<tr>
<td> Software Engineering</td>
<td>' . $values[$record["se"]-1] . '</td>
</tr>
<tr>
<td> Business Analysis</td>
<td>' . $values[$record["ba"]-1] . '</td>
</tr>
<tr>
<td> Communication skills</td>
<td>' . $values[$record["comski"]-1] . '</td>
</tr>
<tr>
<td> Data Science</td>
<td>' . $values[$record["ds"]-1] . '</td>
</tr>
<tr>
<td> Troubleshooting skills</td>
<td>' . $values[$record["ts"]-1] . '</td>
</tr>
<tr>
<td> Graphics Designing</td>
<td>' . $values[$record["gd"]-1] . '</td>
</tr>
<tr>
<td colspan="2">
<span class="pred">Prediction</span>
<h2 id="result" class="mt-1">'. $record["result"].'</h2>
</td>
</tr>
</table>
</div>
<div class="section-personal-details">
<div class="form-buttons">
<button class="btn btn-primary right" type="submit" >Retest</button>
</div>
</div>';
}
else{
echo '<div class="section-personal-details">
<h2 class="card-title">Lets complete a quick questionnaire, to know your choice.. 🙂</h2>
<div class="form-buttons">
<button class="btn btn-primary right" type="submit" >Begin</button>
</div>
</div>';
}
echo '</form>
</div>';
}
else{
header("location: index.php");
}
?>
<!-- end main -->
</div>
</div>
<div class="overlay"></div>
</body>
<!-- body-end-->
</html>