Initial Commit
This commit is contained in:
39
index.php
Normal file
39
index.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
header('Content-type: text/html');
|
||||
session_start();
|
||||
|
||||
if (isset($_SESSION['id']) && isset($_SESSION['user_name'])) {
|
||||
header("Location: ./home.php");
|
||||
exit();
|
||||
} else {
|
||||
?>
|
||||
<html>
|
||||
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"></META>
|
||||
<head>
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" type="text/css" href="./src/CSS/index.css">
|
||||
</head>
|
||||
<body oncontextmenu="return false;">
|
||||
<form action="./login.php" method="post">
|
||||
<h2>LOGIN</h2>
|
||||
<?php
|
||||
if (isset($_GET['error'])) { ?>
|
||||
<p class="error"><?php echo $_GET['error']; ?></p>
|
||||
<?php }
|
||||
if (isset($_GET['message'])) { ?>
|
||||
<p class="message"><?php echo $_GET['message']; ?></p>
|
||||
<?php }
|
||||
?>
|
||||
<label>Username</label>
|
||||
<input type="text" name="uname" placeholder="Username"><br>
|
||||
|
||||
<label>Password</label>
|
||||
<input type="password" name="password" placeholder="Password"><br>
|
||||
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user