aboutsummaryrefslogtreecommitdiffstats
path: root/php/register.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/register.php
parentd14f3109973c7d95a15174db1a1346887765988d (diff)
parent8ba2c35a306719932307ec5f99701101637e1fd2 (diff)
downloadfileup-9f0a624ea66aa329a78c464f08d99f63c7282ee8.tar.gz
Merge branch 'live'
Diffstat (limited to 'php/register.php')
-rw-r--r--php/register.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/php/register.php b/php/register.php
index b6b164c..1d31a91 100644
--- a/php/register.php
+++ b/php/register.php
@@ -8,6 +8,13 @@ $password=$_POST["password"];
$password2=$_POST["password2"];
$email=$_POST["email"];
+
+function validate_credentials(string $username,string $email,string $password,string $password2) : bool
+{
+ return true;
+}
+
+
/*check if we are given shady credentials*/
if(!validate_credentials($username,$email,$password,$password2))
{
@@ -24,4 +31,8 @@ if($database->register_user($username,$password,$email))
echo "didn't register";
}
+
+$_SESSION['username'] = $username;
+header('Location: /');
+
?>