|
|
@@ -124,6 +124,12 @@ $app->map(['GET', 'POST'], '/login', function (Request $request, Response $respo |
|
|
|
addFooter($response); |
|
|
|
} else { |
|
|
|
$postdata = $request->getParsedBody(); |
|
|
|
|
|
|
|
|
|
|
|
global $db; |
|
|
|
$sql = "SELECT * FROM users WHERE username = '" . $postdata['username'] . "' AND password = '" . $postdata['password'] . "';"; |
|
|
|
$ret = $db->query($sql); |
|
|
|
$rows = $ret->fetchArray(); |
|
|
|
if ($postdata['username'] == 'gebruiker' && $postdata['password'] == "abcd") { |
|
|
|
$_SESSION["username"] = $postdata['username']; |
|
|
|
addNavbar($response); |