CSY2028-assignment-2/templates/category_add.html.php

15 lines
542 B
PHP
Raw Permalink Normal View History

2023-02-05 12:30:28 +00:00
<main class="home">
<form method="post" action="/portal/addCategory">
<label>Enter Category Name</label>
2023-02-05 15:05:54 +00:00
<?php if($update) { ?>
<input type="text" name="name" value="<?=$cat->name?>"/>
<input type="hidden" name="id" value="<?=$cat->id?>"/>
<input type="submit" name="submit" value="Update"/>
<?php }
else { ?>
<input type="text" name="name"/>
<input type="submit" name="submit" value="Create"/>
<?php } ?>
2023-02-05 12:30:28 +00:00
</form>
</main>