M includes/index.php +6 -19
@@ 3,26 3,13 @@
<main>
<h1>Your personal wiki</h1>
- <p>lipu li is a little wiki engine that lets you manage your pages online. When a page references another page, lipu li generates a
- backlink.</p>
-
- <form action="login.php" method="post">
- <?php include 'includes/csrf.php' ?>
- <label for="form-name">Email:</label>
- <input type="email" name="email" value="" class="form-control"/>
+ <p>
+ lipu li is a little wiki engine that lets you manage your pages online. When a page references another page,
+ lipu
+ li generates a backlink.
+ </p>
- <label for="form-password">Password:</label>
- <input type="password" name="password" class="form-control" required/>
-
- <p>
- <input type="submit" value="Login"/>
- <input type="checkbox" id="remember" name="remember"> <label for="remember">Remember me</label>
- </p>
-
- <nav>
- <a href="password-lost.php">Password lost?</a> <a href="register.php">Register</a>
- </nav>
- </form>
+ <?php include 'includes/login_form.php' ?>
<p>
<a href="manual.php" class="link">Manual</a><br>
M login.php +1 -11
@@ 26,16 26,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST
<?php form_errors($errors) ?>
-<form action="<?= $_SERVER['PHP_SELF'] ?>" method="post">
- <?php include 'includes/csrf.php' ?>
- <label for="form-name">Email:</label>
- <input type="email" name="email" value="<?= $email ?>" class="form-control" />
-
- <label for="form-password">Password:</label>
- <input type="password" name="password" class="form-control" required/>
-
- <input type="submit" value="Login"/>
- <p><a href="password-lost.php">Password lost?</a></p>
-</form>
+<?php include 'includes/login_form.php' ?>
<?php include 'includes/footer.php'; ?>