-
Notifications
You must be signed in to change notification settings - Fork 1
/
guidereg.php
211 lines (198 loc) · 5.51 KB
/
guidereg.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Guide Registration</title>
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.slidepanel.setup.js"></script>
<script type="text/javascript" src="scripts/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="scripts/jquery.tabs.setup.js"></script>
</head>
<body>
<?php
include 'include/header.php';
include 'include/connect.php';
?>
<div class="wrapper col3" style="padding-top:50px; ">
<div id="leftcol">
<img src="images/demo/27-Training-text_left.png" height="400px"/></div>
<div id="righttcol">
<form method="post">
<table style=" height:400px;">
<tr>
<td>
Name:
</td>
<td>
<input type="text" name="guidename" value="" style="width:300px;"/>
</td>
</tr>
<tr>
<td>
Designation:
</td>
<td>
<select name="designation" style="width:300px; height:30px;" required>
<option value="">Designation </option>
<option >Professor</option>
<option> Associate Professor </option>
<option > Assistant Professor </option>
<option >Lecturer</option>
<option > </option>
</select>
</td>
</tr>
<tr>
<td>
Qualification:
</td>
<td>
<select name="qualification" style="width:300px; height:30px;" required>
<option value="">Qualification</option>
<option >B.Tech</option>
<option>M.Tech </option>
<option >BBA</option>
<option >MBA</option>
<option > BCA</option>
<option > MCA</option>
<option >Phd</option>
</select>
</td>
</tr>
<tr>
<td>
Department:
</td>
<td>
<select name="department" style="width:300px; height:30px;" required>
<option value="">Department</option>
<option >CS</option>
<option> IT </option>
<option >Electrical</option>
<option >Mechanical</option>
<option > EIC </option>
<option > Electronics & Communication </option>
</select>
</td>
</tr>
<tr>
<td>
Specilization:
<td align="left">
<input type='Checkbox' name ='subject[]' value='.NET'/>.NET
<input type='Checkbox' name ='subject[]' value='java'/>Java
<input type='Checkbox' name ='subject[]' value='PHP'/>PHP
<input type='Checkbox' name ='subject[]' value='MySQL'/>MySQL
<input type='Checkbox' name ='subject[]' value='Networking'/>Networking
<input type='Checkbox' name ='subject[]' value='Linux'/>Linux
<input type='Checkbox' name ='subject[]' value='matlab'/>matlab
<input type='Checkbox' name ='subject[]' value='mobile'/>Mobile Technology
</td>
</td>
</tr>
<tr>
<td>
Email ID:
</td>
<td>
<input type="email" name="email" value="" style="width:300px;" />
</td>
</tr>
<tr>
<td>
Contact No.:
</td>
<td>
<input type="text" name="contact" pattern="[7-9]{1}[0-9]{9}" title="Phone number with 7-9 and remaing 9 digit with 0-9" value="" style="width:300px;"> </td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="pass" value="" style="width:300px;"/>
</td>
</tr>
<tr>
<td>
Confirm Password:
</td>
<td>
<input type="password" name="c_pass" value="" style="width:300px;"/>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" name="Submit" value="submit"/>
<input type="reset" name="Reset" value="reset"/>
</td>
</tr>
</table>
</form>
<?php
if($_POST['Submit']=='submit')
{
$v=1;
foreach($_POST['subject'] as $value)
{
$h=$value;
$a=$_POST['guidename'];
$b=$_POST['designation'];
$c=$_POST['qualification'];
$d=$_POST['department'];
$e=$_POST['email'];
$f=$_POST['pass'];
$g=$_POST['c_pass'];
$i-$_POST['contact'];
$check="select * from spam_guide_predefine ";
$check1=mysql_query($check);
if($g==$f)
{
while( $arry=mysql_fetch_array($check1))
{
$r= $arry['registered'];
$n=$arry['name'];
$x=$arry['email'];
if($a==$n && $e==$x )
{
if ($r=="")
{
$sql="insert into spam_sign_in values('','$a','','guide','$b','$c','$h','$e','$f','$i','$d','$v')";
$result=mysql_query($sql);
if($result)
{
echo "<script>alert('you are successfully registered')</script>";
$q= "update spam_guide_predefine set registered='registered' where name='$a' and email='$e'";
$res=mysql_query($q);
if($res){ echo "<script>alert('done')</script>"; }
else{ echo "<script>alert('not done')</script>"; }
}else
{
echo "<script>alert('Check your details')</script>";
}
}
else
{
echo "<script>alert('you are already registered')</script>";
}
$v++;
break;
}
else
{
echo "<script>alert('you are not valid user')</script>";
}
}
}
else
{
echo "<script>alert('re-enter your password')</script>";
}}}
?>
</div>
</div>
</body>
</html>