-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivate.php
More file actions
36 lines (31 loc) · 957 Bytes
/
activate.php
File metadata and controls
36 lines (31 loc) · 957 Bytes
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
<?php
/**
* Created by IntelliJ IDEA.
* User: mithishri
* Date: 9/30/2016
* Time: 9:52 PM
*/
if(isset($_GET['id'])&&isset($_GET['key'])){
include ('conn.php');
$email = mysqli_real_escape_string($link,$_GET['id']);
$key = mysqli_real_escape_string($link,$_GET['key']);
$query = "UPDATE users
SET activated = 1
WHERE email = '$email' AND password = '$key'";
if($result = mysqli_query($link, $query)) {
echo 'Your account is activated.';
include ('sendmail.php');
$subject = "Activation Successful";
$body = "
<p>Congrats, your account has been activated. <br>
Now you can login and can access fully featured Restro Website. <br>
Have a great day.
Cheers!<br>
Restro Team
</p>
";
send_mail($email, $subject, $body);
}
}
else
echo 'Activation failed. Contact support team.';