-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathverification.php
More file actions
153 lines (120 loc) · 3.95 KB
/
verification.php
File metadata and controls
153 lines (120 loc) · 3.95 KB
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
<?php
session_start();
include('connect.php');
?>
<!DOCTYPE html>
<html>
<head>
<title>Verification Page</title>
<style>
body {
background: linear-gradient(135deg, #71b7e6, #9b59b6);
}
.container {
max-width: 500px;
margin: 50px auto;
padding: 20px;
background-color: #ffffff;
border-radius: 5px;
}
h1 {
text-align: center;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="text"],
textarea {
width: 100%;
padding: 8px;
border-radius: 3px;
border: 1px solid #ccc;
}
#btnn {
display: block;
width: 100%;
padding: 10px;
background-color: skyblue;
color: #ffffff;
border: none;
border-radius: 5px;
cursor: pointer;
border: 2px solid black;
transition: 0.8s;
}
#btnn:hover {
background-color: #1e41db;
}
input[type="file"] {
display: inline;
margin-bottom: 10px;
}
input[type="submit"] {
display: inline;
border: none;
padding: 5px;
background-color: #4c82af;
color: #fff;
text-align: center;
font-size: 16px;
font-weight: bold;
cursor: pointer;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="container">
<h1>Verification Page</h1>
<form action="verification.php" method="post">
<label for="years">Years of Experience:</label>
<input type="text" id="years" name="years" required />
<label for="qualifications">Qualifications:</label>
<input type="text" id="qualifications" name="qualifications" required />
<label for="specialization">Specialization:</label>
<input type="text" id="specialization" name="special" required />
<label for="previous">Previous Experience:</label>
<textarea id="previous" name="previous" rows="3" required></textarea>
<label for="skills">Other Skills:</label>
<textarea id="skills" name="skills" rows="3" required></textarea>
<!-- <form action="insert.php" method="post" enctype="multipart/form-data">
<label for="documents">Upload Documents:</label>
<input type="file" name="pdf" id="fileToUpload" required />
<input type="submit" value="Upload" />
</form> -->
<input type="submit" id="btnn" name="submit" value="Submit and Proceed" />
</form>
</div>
<?php
if(isset($_POST['submit'])){
$mail = $_SESSION['mail'];
$sql = "select *from verification where mail = '$mail'";
$result = mysqli_query($conn , $sql);
$count = mysqli_num_rows($result);
$row = $result->fetch_assoc();
if($count==1)
{
?>
<script>
alert("You have already applied for verification");
</script>
<?php
}
else{
$mail = $_SESSION['mail'];
$exp = $_POST['years'];
$qual = $_POST['qualifications'];
$spec = $_POST['special'];
$prev = $_POST['previous'];
$other = $_POST['skills'];
$sql = "INSERT INTO verification (experience, qualification, specialization, prevExp, other, pdf, mail) VALUES ('$exp', '$qual', '$spec', '$prev', '$other', NULL , '$mail');";
$sql2 = "UPDATE teacher SET Specialization = '$spec' WHERE Mail = '$mail';";
$result = mysqli_query($conn, $sql);
$result = mysqli_query($conn , $sql2);
echo "<script>window.location.href='insert.php'</script>";
}
}
?>
</body>
</html>