aboutsummaryrefslogtreecommitdiffstats
path: root/php/login.php
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-01-29 15:07:18 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-01-29 15:07:18 +0200
commit9f0a624ea66aa329a78c464f08d99f63c7282ee8 (patch)
treef645f99ac9b9fb503d98df782525b75c7bae45f7 /php/login.php
parentd14f3109973c7d95a15174db1a1346887765988d (diff)
parent8ba2c35a306719932307ec5f99701101637e1fd2 (diff)
downloadfileup-9f0a624ea66aa329a78c464f08d99f63c7282ee8.tar.gz
Merge branch 'live'
Diffstat (limited to 'php/login.php')
-rw-r--r--php/login.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/php/login.php b/php/login.php
index e6d44dc..536a5bf 100644
--- a/php/login.php
+++ b/php/login.php
@@ -3,6 +3,8 @@ require_once "user.php";
require_once "database.php";
require_once "misc.php";
+session_start();
+
$username=$_POST["username"];
$password=$_POST["password"];
/*server side verification*/
@@ -18,8 +20,7 @@ if(!$user)
die("Password or username is incorrect");
}
-echo "Username: {$user->username}\n";
-echo "Email: {$user->email_address}";
-
+$_SESSION['username'] = $user->username;
+header('Location: /');
?>