Skip to content

Commit

Permalink
get rid of POST superglobal
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed May 16, 2024
1 parent 46541e0 commit 32aa5ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<h1>Sign in</h1>
<form method="post">
<input autofocus type="email" name="email" placeholder="Email" aria-label="Email"
aria-invalid="<?= isset($_POST['login_submit']) ? 'true' : '' ?>"
aria-invalid="<?= !empty($defaultEmail) ? 'true' : '' ?>"
value="<?= htmlspecialchars($defaultEmail) ?>" required/>

<input type="password" name="password" placeholder="Password" aria-label="Password"
aria-invalid="<?= isset($_POST['login_submit']) ? 'true' : '' ?>"
aria-invalid="<?= !empty($defaultEmail) ? 'true' : '' ?>"
required/>

<button name="login_submit" type="submit" class="contrast">Login</button>
Expand Down

0 comments on commit 32aa5ab

Please sign in to comment.