DK2/templates/pages/chars/select.php

16 lines
604 B
PHP
Raw Normal View History

2024-10-03 16:25:25 -05:00
<h1>Characters</h1>
<?php
if (count($chars) > 0): ?>
2024-10-03 16:25:25 -05:00
<form action="/character/select" method="post">
<input type="hidden" name="csrf" value="<?= csrf() ?>">
<?php foreach ($chars as $id => $char): ?>
2024-10-03 16:25:25 -05:00
<input type="radio" name="char_id" value="<?= $id ?>" id="char_<?= $id ?>">
<label for="char_<?= $id ?>"><?= $char['name'] ?> (Level <?= $char['level'] ?>)</label><br>
<?php endforeach; ?>
<input type="submit" value="Select Character">
</form>
<?php else: ?>
<!-- Should never see this particular message. If you have, there's a bug. -->
<p>You have no characters.</p>
<?php endif; ?>