forked from UKKWariors/Website-Pengaduan-Masyarakat-Remake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
verifikasi.php
75 lines (66 loc) · 2.2 KB
/
verifikasi.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
session_start() ;
include('connect/connection.php');
?>
<?php
include('connect/connection.php');
if(isset($_POST["verify"])){
$otp = $_SESSION['otp'];
$email = $_SESSION['mail'];
$otp_code = $_POST['otp_code'];
if($otp != $otp_code){
?>
<script>
alert("Kode Verifikasi Salah");
</script>
<?php
}else{
mysqli_query($connect, "UPDATE login SET status = 1 WHERE email = '$email'");
?>
<script>
alert("Akun ada yelah terverifikasi, anda bisa masuk sekarang");
window.location.replace("masuk.php");
</script>
<?php
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<title>Verifikasi Akun</title>
<link rel="stylesheet" href="./css/verifikasi.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="./js/main.js"></script>
<link rel="icon" href="../image/otp.png">
</head>
<body>
<div class="box">
<div class="form">
<form action="#" method="POST">
<h2>Mana kode verifikasi lu?</h2>
<div class="inputBox">
<input type="text" id="otp" name="otp_code" required="required" autocomplete="off" autofocus>
<span>Kode Verifikasi</span>
<i></i>
</div>
<br>
<input type="submit" value="Verifikasi" name="verify">
<br>
</form>
</div>
</div>
</body>
<script>{
const toggle = document.getElementById('togglePassword');
const password = document.getElementById('password');
if(password.type === "password"){
password.type = 'text';
}else{
password.type = 'password';
};
}
</script>