-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify.php
More file actions
34 lines (28 loc) · 1.08 KB
/
verify.php
File metadata and controls
34 lines (28 loc) · 1.08 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
<?php
require_once('config.php');
?>
<!DOCTYPE html>
<html lang="pl">
<head>
<title>Weryfikacja</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
<div>
<?php
if(isset($_GET['hash']) && !empty($_GET['hash'])){
$hash = $link->real_escape_string($_GET['hash']);
$search = $link->query("SELECT hash, active FROM users WHERE hash='$hash' AND active='0'");
if($search->num_rows > 0) {
$link->query("UPDATE users SET active='1' WHERE hash='$hash' AND active='0'");
echo '<div>Your account has been verified.<br>You can close this tab.<br>';
}
else {
echo '<div>URL address is incorrect or you have already verified your account.</div>';
}
}
?>
</div>
</body>
</html>