diff options
Diffstat (limited to 'php/register.php')
-rw-r--r-- | php/register.php | 11 |
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: /'); + ?> |