-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverifyUser.php
More file actions
33 lines (32 loc) · 1.12 KB
/
verifyUser.php
File metadata and controls
33 lines (32 loc) · 1.12 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
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<?php
require_once("C:\\xampp\\htdocs\\BusinessDatabase\\Includes\\dp.php");
?>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
if(isset($_GET['email']) && !empty($_GET['email']) AND isset($_GET['hash']) && !empty($_GET['hash'])){
// Verify data
$email = mysql_escape_string($_GET['email']); // Set email variable
$hash = mysql_escape_string($_GET['hash']); // Set hash variable
}
$search = BusinessDB::getInstance()->check_user_hash($email, $hash);
$match = mysqli_num_rows($search);
if($match > 0){
echo "Success! Your account has been verified! You may now login!";
$updateAccount = BusinessDB::getInstance()->update_user_account($email, $hash);
}else{
echo "Failed! Invalid URL or account has already been activated!";
}
?>
</body>
</html>