-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify.php
More file actions
54 lines (46 loc) · 1.35 KB
/
verify.php
File metadata and controls
54 lines (46 loc) · 1.35 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
<?php
require("connection.php");
if(isset($_GET['email']) && isset($_GET['v_code']))
{
$query="SELECT * FROM `registered_user` WHERE `email`='$_GET[email]' OR `verificationcode`='$_GET[v_code]'";
$result = mysqli_query($con,$query);
if($result)
{
if(mysqli_num_rows($result)==1)
{
$result_fetch = mysqli_fetch_assoc($result);
if($result_fetch['isverified']==0)
{
$update = "UPDATE `registered_user` SET `isverified`='1' WHERE `email`='$result_fetch[email]'";
if(mysqli_query($con,$update))
{
echo "<script>alert('Email Verification Successful');
window.location.href='userauth';
</script>";
}
else{
echo "<script>alert('Server Down!!!');
window.location.href='userauth';
</script>";
}
}
else
{
echo "<script>alert('Server Down!!!');
window.location.href='userauth';
</script>";
}
}
else{
echo "<script>alert('Server Down!!!');
window.location.href='userauth';
</script>";
}
}
else
{
echo "<script>alert('Server Down!!!');
window.location.href='userauth';
</script>";
}
}