-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathverify.php
53 lines (51 loc) · 1.48 KB
/
verify.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
<?php
require("Connection.php");
if(isset($_GET['email']) && isset($_GET['v_code']))
{
$query="SELECT * FROM `registered_users` WHERE `email`='$_GET[email]' AND `verification_code`='$_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['is_verified']==0)
{
$update="UPDATE `registered_users` SET `is_verified`='1' WHERE `email`='$result_fetch[email]'";
if(mysqli_query($con,$update)){
echo"
<script>
alert('Verificação Confirmada!');
window.location.href='index.php';
</script>
";
}
else{
echo"
<script>
alert('Não é possivel realizar a consulta');
window.location.href='index.php';
</script>
";
}
}
else{
echo"
<script>
alert('Email já registrado!');
window.location.href='index.php';
</script>
";
}
}
}
else{
echo"
<script>
alert('Não é possivel realizar a consulta');
window.location.href='index.php';
</script>
";
}
}
?>