-
Notifications
You must be signed in to change notification settings - Fork 0
/
activation.php
47 lines (40 loc) · 1.03 KB
/
activation.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
<?php
require 'connectionstu.php';
$conn = Connect();
$msg='';
if(!empty($_GET['code']) && isset($_GET['code']))
{
$code=mysqli_real_escape_string($conn,$_GET['code']);
$c=mysqli_query($conn,"SELECT studentID FROM stregister WHERE activation='$code'");
if(mysqli_num_rows($c) > 0)
{
$count=mysqli_query($conn,"SELECT studentID FROM stregister WHERE activation='$code'");
if(mysqli_num_rows($count) == 1)
{
mysqli_query($conn,"UPDATE stregister SET status='1' WHERE activation='$code'");
$msg="Your account is Verified. <br> <br> You will get the examination link on the day of exam. <br><br> Thank you.";
}
else
{
$msg ="Your account is already active, no need to activate again";
}
}
else
{
$msg ="Wrong activation code.";
}
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>PHP Email Verification Script</title>
<link rel="stylesheet" href="<?php echo $base_url; ?>style.css"/>
</head>
<body>
<div id="main">
<h2><?php echo $msg; ?></h2>
</div>
</body>
</html>