wishthis/includes/pages/wishlist-product-add.php

48 lines
1.2 KiB
PHP
Raw Normal View History

2021-11-15 13:43:57 +00:00
<?php
/**
* wishlist.php
*
* @author Jay Trees <github.jay@grandel.anonaddy.me>
*/
use wishthis\{Page, User};
2021-11-15 13:43:57 +00:00
2021-11-15 13:55:05 +00:00
if (isset($_POST['url'], $_POST['wishlist'])) {
$database->query('INSERT INTO `products`
(`wishlist`, `url`) VALUES
(' . $_POST['wishlist'] . ', "' . $_POST['url'] . '")
;');
}
2021-11-15 13:43:57 +00:00
2021-11-15 13:55:05 +00:00
$page = new page(__FILE__, 'Add a product');
2021-11-15 13:43:57 +00:00
$page->header();
2022-01-13 13:15:43 +00:00
$page->navigation();
$user = new User();
2021-11-15 13:43:57 +00:00
?>
<main>
2022-01-14 08:28:41 +00:00
<div class="ui container">
<div class="ui segment">
2022-01-17 12:16:11 +00:00
<h1 class="ui header"><?= $page->title ?></h1>
2022-01-14 08:28:41 +00:00
<form class="ui form" method="post">
<div class="field">
<label>URL</label>
2022-01-14 08:41:58 +00:00
<input type="url" name="url" />
2022-01-14 08:28:41 +00:00
</div>
<div class="field">
<select class="ui search selection dropdown loading wishlists" name="wishlist">
<option value="">Loading your wishlists...</option>
</select>
</div>
<input class="ui primary button" type="submit" value="Add" />
</form>
</div>
2022-01-13 13:15:43 +00:00
</div>
2021-11-15 13:43:57 +00:00
</main>
<?php
$page->footer();