DK2/templates/pages/home.php
2024-09-27 18:45:33 -05:00

12 lines
343 B
PHP

<?php if (!auth_check()): ?>
Hello, oppai!
<a href="/auth/register">Register</a>
<a href="/auth/login">Login</a>
<?php else: ?>
Hello, <?= $_SESSION['user']['username'] ?>!
<form action="/auth/logout" method="post">
<input type="hidden" name="csrf" value="<?= csrf() ?>">
<input type="submit" value="Logout">
</form>
<?php endif; ?>