Last active
March 26, 2023 12:08
-
-
Save djoudi/8928c464c3d338e26b4210eba2355d54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION["ecoin"])) { | |
header("Location:connect.php"); | |
} | |
include "inc/header.php"; | |
?> | |
<div> | |
<h1>Welcom To Admin</h1> | |
</div> | |
<?php include "inc/header.php" ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
const USER = "[email protected]"; | |
const PASSWORD = "123456"; | |
include "inc/header.php"; | |
$u = (isset($_POST['user']))?$_POST['user']:null; | |
$p = (isset($_POST['pass']))?$_POST['pass']:null; | |
if ($u == USER && $p == PASSWORD) { | |
echo '<h3 class="ok">OK</h3>'; | |
//echo md5($u); | |
$_SESSION['ecoin'] = md5($u); | |
header("Location:admin.php"); | |
}else { | |
echo '<h3 class="error">NOT WORK</h3>'; | |
} | |
?> | |
<div class="login"> | |
<form action="" method="POST"> | |
<div class="input"> | |
User<input type="text" name="user"> | |
</div> | |
<div class="input"> | |
Password<input type="password" name="pass"> | |
</div> | |
<button type="submit">Login</button> | |
</form> | |
</div> | |
<?php include "inc/header.php" ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment