-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtopicofinterest.php
172 lines (150 loc) · 5.51 KB
/
topicofinterest.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
170
171
<?php session_start() ?>
<!DOCTYPE html>
<html>
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Theme CSS -->
<link href="css/freelancer.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<head>
<title>Topics</title>
</head>
<style>
.form-group input[type="checkbox"] {
display: none;
}
.form-group input[type="checkbox"] + .btn-group > label span {
width: 20px;
}
.form-group input[type="checkbox"] + .btn-group > label span:first-child {
display: none;
}
.form-group input[type="checkbox"] + .btn-group > label span:last-child {
display: inline-block;
}
.form-group input[type="checkbox"]:checked + .btn-group > label span:first-child {
display: inline-block;
}
.form-group input[type="checkbox"]:checked + .btn-group > label span:last-child {
display: none;
}
</style>
<body>
<div class="container">
<form method="post">
<div class="row">
<div class="col-xs-12 col-sm-12">
<center><h3>Select your topic</h3></center>
<hr />
<div class="row">
<div class="col-md-2 col-md-offset-3">
<div class="form-group ">
<input type="checkbox" name="top" id="data-structure" autocomplete="off" />
<div class="btn-group row">
<label for="data-structure" class="btn btn-default">
<span class="glyphicon glyphicon-ok"></span>
<span> </span>
</label>
<label for="data-structure" class="btn btn-default active">
Data Structures
</label>
</div>
</div>
</div>
<div class="col-md-2">
<div class="form-group ">
<input type="checkbox" name="top" id="operating-system" autocomplete="off" />
<div class="btn-group row">
<label for="operating-system" class="btn btn-default">
<span class="glyphicon glyphicon-ok"></span>
<span> </span>
</label>
<label for="operating-system" class="btn btn-default">
Operating System
</label>
</div>
</div>
</div>
<div class="col-md-2">
<div class="form-group ">
<input type="checkbox" name="top" id="android" autocomplete="off" />
<div class="btn-group row">
<label for="android" class="btn btn-default">
<span class="glyphicon glyphicon-ok"></span>
<span> </span>
</label>
<label for="android" class="btn btn-default">
Android
</label>
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-md-2 col-md-offset-3">
<div class="form-group ">
<input type="checkbox" name="data-structure" id="data-structure" autocomplete="off" />
<div class="btn-group row">
<label for="data-structure" class="btn btn-default">
<span class="glyphicon glyphicon-ok"></span>
<span> </span>
</label>
<label for="data-structure" class="btn btn-default active">
Data Structures
</label>
</div>
</div>
</div>
<div class="col-md-2">
<div class="form-group ">
<input type="checkbox" name="operating-system" id="operating-system" autocomplete="off" />
<div class="btn-group row">
<label for="operating-system" class="btn btn-default">
<span class="glyphicon glyphicon-ok"></span>
<span> </span>
</label>
<label for="operating-system" class="btn btn-default">
Operating System
</label>
</div>
</div>
</div>
<div class="col-md-2">
<div class="form-group ">
<input type="checkbox" name="android" id="android" autocomplete="off" />
<div class="btn-group row">
<label for="android" class="btn btn-default">
<span class="glyphicon glyphicon-ok"></span>
<span> </span>
</label>
<label for="android" class="btn btn-default">
Android
</label>
</div>
</div>
</div>
</div>
</div>
</div>
-->
<div class="row">
<center>
<button class="btn btn-success" name="topicofinterest">Submit</button>
</center>
</div>
</form>
<?php
if(isset($_POST['topicofinterest']))
{
//echo "<script> window.open('home.php','_self')</script>";
$email=$_SESSION['user_email'];
$topic=mysqli_real_escape_string($con,$_POST['top']);
$insert="Insert into users(topicofinterest) values('$topic') where user_email='$email'";
$run=mysqli_query($con,$insert) or die(mysqli_error($con));
}
?>
</div>
</body>
</html>