response now triggers on login page
This commit is contained in:
parent
422c89f80d
commit
fa203f16cc
|
|
@ -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
|
||||
];
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@
|
|||
|
||||
<input type="submit" name="submit" value="Log In" />
|
||||
</form>
|
||||
</main>
|
||||
</main>
|
||||
<p><?=nl2br($response)?></p>
|
||||
|
|
|
|||
Loading…
Reference in New Issue