You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.6 KiB
92 lines
2.6 KiB
6 months ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>OTP Verification</title>
|
||
|
<style>
|
||
|
body {
|
||
|
font-family: Arial, sans-serif;
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
height: 100vh;
|
||
|
}
|
||
|
.container {
|
||
|
text-align: center;
|
||
|
padding: 20px;
|
||
|
border: 1px solid #ccc;
|
||
|
border-radius: 10px;
|
||
|
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
|
||
|
max-width: 400px;
|
||
|
width: 100%;
|
||
|
}
|
||
|
h2 {
|
||
|
margin-bottom: 20px;
|
||
|
}
|
||
|
form {
|
||
|
margin-bottom: 20px;
|
||
|
}
|
||
|
label {
|
||
|
display: block;
|
||
|
margin-bottom: 8px;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
input[type="text"] {
|
||
|
width: 100%;
|
||
|
padding: 10px;
|
||
|
margin-bottom: 20px;
|
||
|
border: 1px solid #ccc;
|
||
|
border-radius: 5px;
|
||
|
}
|
||
|
button {
|
||
|
background-color: #007bff;
|
||
|
color: white;
|
||
|
border: none;
|
||
|
padding: 10px 20px;
|
||
|
border-radius: 5px;
|
||
|
cursor: pointer;
|
||
|
font-size: 16px;
|
||
|
}
|
||
|
button:hover {
|
||
|
background-color: #0056b3;
|
||
|
}
|
||
|
#message {
|
||
|
margin-top: 10px;
|
||
|
font-size: 14px;
|
||
|
color: #333;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="container">
|
||
|
<h2>OTP Verification</h2>
|
||
|
<form id="otpVerificationForm">
|
||
|
<label for="otp">Enter the OTP:</label>
|
||
|
<input type="text" id="otp" name="otp" placeholder="Enter the OTP" required>
|
||
|
<button type="button" onclick="verifyOtp()">Verify OTP</button>
|
||
|
</form>
|
||
|
<div id="message"></div>
|
||
|
</div>
|
||
|
<script>
|
||
|
function verifyOtp() {
|
||
|
const enteredOtp = document.getElementById("otp").value;
|
||
|
const message = document.getElementById("message");
|
||
|
|
||
|
const staticOtp = '7000'; // Static OTP
|
||
|
|
||
|
if (enteredOtp === staticOtp) {
|
||
|
message.textContent = 'OTP verified successfully. Redirecting to homepage...';
|
||
|
setTimeout(function() {
|
||
|
window.location.href = 'homepage.php'; // Redirect to homepage
|
||
|
}, 2000); // Redirect after 2 seconds
|
||
|
} else {
|
||
|
message.textContent = "Invalid OTP. Please try again.";
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|