-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmitted.php
More file actions
108 lines (69 loc) · 3.42 KB
/
submitted.php
File metadata and controls
108 lines (69 loc) · 3.42 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
<?php
$con = mysqli_connect('','abhi','Hoticecream1#','registration_details');
if (!empty($_REQUEST['submit2'])) {
$name2 = htmlspecialchars($_REQUEST['name2']);
$email2 = htmlspecialchars($_REQUEST['email2']);
$email22 = htmlspecialchars($_REQUEST['email22']);
$contact2 = htmlspecialchars($_REQUEST['contact2']);
$branch2 = htmlspecialchars($_REQUEST['branch2']);
$year2 = htmlspecialchars($_REQUEST['year2']);
$enrollment_no2 = htmlspecialchars($_REQUEST['enrollment_no2']);
$s_no2;
$query0 = mysqli_query($con,"select s_no2 from campus_students where email2='$email2'");
$row = mysqli_fetch_array($query0,MYSQLI_ASSOC);
if ($row['s_no2']) {
echo "<script type='text/javascript'>";
echo "alert('The email you entered is already registered. Try registering with a new email id. Thanks.')
window.location=('index.html');";
echo "</script> ";
}
else
{
$query1 = mysqli_query($con,"insert into campus_students(name2,enrollment_no2,email2,contact2,branch2,year2) values ('$name2','$enrollment_no2',
'$email2','$contact2','$branch2','$year2')");
$query2 = mysqli_query($con,"select s_no2 from campus_students where email2='$email2'");
$row = mysqli_fetch_array($query2,MYSQLI_NUM);
$fest_id2 = 'TN-ID/CS0'.$row[0];
$query3 = mysqli_query($con,"UPDATE campus_students SET fest_id2='$fest_id2' WHERE email2='$email2'");
mail($email2, "Registration successfull. TECH-NOESIS 2015", "Thank you for registering with us. Your fest id is ".$fest_id2);
echo "<script type='text/javascript'>";
echo "alert('Thanks for registering with us the fest id is sent to the email and phone you provided!')
window.location=('index.html');";
echo "</script> ";
}
}
elseif (!empty($_REQUEST['submit']))
{
$name = htmlspecialchars($_REQUEST['name']);
$email = htmlspecialchars($_REQUEST['email']);
$email22 = htmlspecialchars($_REQUEST['email11']);
$contact = htmlspecialchars($_REQUEST['contact']);
$branch = htmlspecialchars($_REQUEST['branch']);
$year = htmlspecialchars($_REQUEST['year']);
$college = htmlspecialchars($_REQUEST['college']);
$gender = htmlspecialchars($_REQUEST['gender']);
$accomodation = htmlspecialchars($_REQUEST['accomodation']);
$s_no;
$query0 = mysqli_query($con,"select s_no from guest_comers where email='$email'");
$row = mysqli_fetch_array($query0,MYSQLI_ASSOC);
if ($row['s_no']) {
echo "<script type='text/javascript'>";
echo "alert('The email you entered is already registered. Try registering with a new email id. Thanks.')
window.location=('index.html');";
echo "</script> ";
}
else
{
$query1 = mysqli_query($con,"insert into guest_comers(name,gender,accomodation,email,contact,branch,year,college) values ('$name',
'$gender','$accomodation','$email','$contact','$branch','$year','$college')");}
$query2 = mysqli_query($con,"select s_no from guest_comers where email='$email'");
$row = mysqli_fetch_array($query2,MYSQLI_NUM);
$fest_id = 'TN-ID/GC0'.$row[0];
$query3 = mysqli_query($con,"UPDATE guest_comers SET fest_id='$fest_id' WHERE email='$email'");
mail($email, "Registration successfull. TECH-NOESIS 2015", "Thank you for registering with us. Your fest id is ".$fest_id);
echo "<script type='text/javascript'>";
echo "alert('Thanks for registering with us the fest id is sent to the email and phone you provided!')
window.location=('index.html');";
echo "</script> ";
}
?>