Made login html

This commit is contained in:
neerholt 2021-03-04 14:12:14 +01:00
parent 6cf27d1cc6
commit dd66573508
2 changed files with 3 additions and 2 deletions

View File

@ -15,11 +15,11 @@ if(isset($_POST['login'])){
$group = Group::firstWhere('groupName', $groupName ); $group = Group::firstWhere('groupName', $groupName );
if($group){ if($group){
$hashedPassword = $group->password()->password; $hashedPassword = $group->password->password;
if(password_verify($password, $hashedPassword )){ if(password_verify($password, $hashedPassword )){
$_SESSION['groupName'] = $groupName; $_SESSION['groupName'] = $groupName;
$_SESSION['success'] = "You are now logged in"; $_SESSION['success'] = "You are now logged in";
header('location: Main.php?yeah=aa'); header('location: Main.php?login=success');
} }
} }

View File

@ -32,6 +32,7 @@ $gameJam = GameJam::firstOrCreate([
<input type="submit" name="login" value="login"> <input type="submit" name="login" value="login">
</form> </form>
</body> </body>
</html> </html>