-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess.php
More file actions
24 lines (22 loc) · 798 Bytes
/
process.php
File metadata and controls
24 lines (22 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
session_start();
$correctUserName = "user";
$correctPassword = "";
$username = $_POST['username']; // Stores our inputted data in these variable names
//safe() refers to a function in config.php
$password = $_POST['password'];// Stores our inputted data in these variable names
if (isset($_POST['correctPassword'])){
$correctPassword=$_POST['correctPassword'];
}
if($correctUserName==$username && $correctPassword==$password && $password != "") {
$_SESSION['loggedin_post'] = 1;
echo("login successful");
header('Location: http://thewebbster.info/post/admin.php'); //Successful login
exit();
}
else {
echo("login unsuccessful");
header('Location: http://thewebbster.info/post/loginForm.php?error=1'); //Login not successful redirect back to login form
exit();
}
?>