Added password lock to ticket system
Created php file to redirect to the ticket submit page when entering right password
This commit is contained in:
19
php/unlock.php
Normal file
19
php/unlock.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
$pass = "test123";
|
||||
$try = $_POST['password'] ?? '';
|
||||
$unlocked = false;
|
||||
|
||||
if ($pass === $try) {
|
||||
$unlocked = true;
|
||||
}
|
||||
|
||||
if ($unlocked) {
|
||||
$_SESSION['unlocked'] = true;
|
||||
header("Location: ./ticket_lock.php");
|
||||
exit;
|
||||
} else {
|
||||
header("Location: ../index.html?error=1");
|
||||
exit;
|
||||
}
|
||||
Reference in New Issue
Block a user