response now triggers on login page

This commit is contained in:
Joshua Perry 2023-01-23 18:45:00 +00:00
parent 422c89f80d
commit fa203f16cc
2 changed files with 4 additions and 3 deletions

View File

@ -13,6 +13,7 @@ class Admin {
$this->appsTable = $appsTable;
$this->usersTable = $usersTable;
$this->vars['cats'] = $this->catsTable->findAll();
$this->vars['response'] = '';
}
public function home() {
@ -35,7 +36,6 @@ class Admin {
}
}
else {
$this->vars['response'] = '';
if ($_POST['username'] == '') {
$this->vars['response'] .= "No Username was entered \n";
}
@ -45,7 +45,7 @@ class Admin {
$this->vars['response'] .= 'Login Unsuccessful';
}
return ['template' => 'response.html.php',
return ['template' => 'admin.html.php',
'title' => 'Jo\'s Jobs- Login',
'vars' => $this->vars
];

View File

@ -10,4 +10,5 @@
<input type="submit" name="submit" value="Log In" />
</form>
</main>
</main>
<p><?=nl2br($response)?></p>