aboutsummaryrefslogtreecommitdiffstats
path: root/php/register.php
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-01-29 14:01:41 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-01-29 14:01:41 +0200
commitf4d5d71da4f94bf9bc87505e745eed913c9858b9 (patch)
treec5c2e7505c74d4bb500675cc57fdf9b1cf554e34 /php/register.php
parentfdea65e03218d175bcc5d5f2bbb426688a6cf42e (diff)
downloadfileup-f4d5d71da4f94bf9bc87505e745eed913c9858b9.tar.gz
Login is now remembered in $_SESSION['username']
If it is set, user is logged in, if it is unset user is not logged in
Diffstat (limited to 'php/register.php')
-rw-r--r--php/register.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/php/register.php b/php/register.php
index ef1f238..1d31a91 100644
--- a/php/register.php
+++ b/php/register.php
@@ -31,4 +31,8 @@ if($database->register_user($username,$password,$email))
echo "didn't register";
}
+
+$_SESSION['username'] = $username;
+header('Location: /');
+
?>