summaryrefslogtreecommitdiff
path: root/public/index.php
blob: 57a5d91f32d6892670d66e2acab892bd26840819 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

\Elements\Template::init();
\Elements\DB::init();
new \Elements\Router();

$fields = [
  'name' => 'meta[name]',
  'converted mana cost' => 'meta[cmc]',
  'is uno reverse' => 'meta[is_uno_reverse]',
];
?>

<form action="<?= '/card/add' ?>" method="post" enctype="multipart/form-data">
  <?php foreach ($fields as $key => $field): ?>
  <label>
    <?= $key ?> <input type="text" name="<?= $field ?>">
  </label>
  <?php endforeach; ?>
  <input type="submit" value="Hinzufügen">
</form>

<?php