-
Notifications
You must be signed in to change notification settings - Fork 0
/
insert_data.php
126 lines (98 loc) · 3.49 KB
/
insert_data.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
<?php
include "connDB.php";
error_reporting(0);
if(!isset($_SESSION["aname"])){
$uname=$_POST["name"];
$password=$_POST["password"];
$sql1 = "SELECT password FROM `admin` WHERE username='$uname'";
$pass_array=array();
$result1 = mysqli_query($conn, $sql1);
if (mysqli_num_rows($result1) > 0) {
while($row1 = mysqli_fetch_assoc($result1)){
$pass_array.array_push($pass_array,$row1["password"]);
}
}
else{
echo "<script>location.href='admin.php'</script>";
}
if($password==$pass_array[0]){
$_SESSION["aname"]=$uname;
}
else{
echo "<script>location.href='admin.php'</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</head>
<body>
<p style="text-align:center;font-size:7vmin;font-weight:bold;color:white">Welcome Admin</p>
<div class="formContainer">
<form action="response.php" method="post" class="card">
<p style="text-align:center;font-size:3vmin;font-weight:bold;color:white">Insert Participants!!!</p>
<input type="email" name="email" id="email" class="email inp" placeholder="Enter participants email..." required>
<input type="text" name="uid" id="uid" class="uid inp" placeholder="Enter participants uid..." required>
<div class="btnHolder" style="display: flex; justify-content: center; align-items: center; margin-top: 6vmin;">
<input type="submit" value="submit" class="btn btn-primary">
</form>
</div>
</div>
</body>
</html>
<style>
body{
background-color: rgb(71, 161, 217);
overflow-x:hidden;
}
.formContainer{
width:100vw;
height:90vh;
display:flex;
justify-content:center;
}
@media(max-width:800px){
.card{
width:80vmin;
height:75vmin;
margin-top:5vmin;
border:3px solid #3F4865 ;
background-color: #3F4865 ;
}
.inp{
width:95%;
border-radius:3vmin;
border-bottom: 1px solid white;
margin-left: 0.85vmin;
padding:2vmin;
height: 10vmin;
margin-top: 5vmin;
}
}
@media(min-width:801px){
.card{
width:80vmin;
height:45vmin;
margin-top:5vmin;
border:3px solid #3F4865 ;
background-color: #3F4865 ;
}
.inp{
width:95%;
border-radius:3vmin;
border-bottom: 1px solid white;
margin-left: 1vmin;
padding:2vmin;
height:7vmin;
margin-top: 5vmin;
}
}
</style>