This repository was archived by the owner on Feb 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd-product.php
More file actions
77 lines (70 loc) · 2.84 KB
/
add-product.php
File metadata and controls
77 lines (70 loc) · 2.84 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles/add-product.css">
<title>Product Add</title>
</head>
<body>
<header>
<h1>Product Add</h1>
<div id="btn-container">
<button>Save</button>
<button>Cancel</button>
</div>
</header>
<section>
<form id="product_form" method="post" action="./scripts/form-submission.php">
<label for="sku">SKU</label>
<input id="sku" name="skuField" type="text" autocomplete="off">
<label for="name">Name</label>
<input id="name" name="nameField" type="text" autocomplete="off">
<label for="price">Price ($)</label>
<input id="price" name="priceField" type="number" min="0.01" value="0.01">
<label for="productType">Type Switcher</label>
<select id="productType" name="productType">
<option value="DVD">DVD</option>
<option value="Book">Book</option>
<option value="Furniture">Furniture</option>
</select>
<fieldset id="DVD-info">
<label for="size">Size (MB)</label>
<input id="size" name="size" type="number" min="1" step="1" value="1">
<span>Please, provide size</span>
</fieldset>
<fieldset id="Book-info">
<label for="weight">Weight (KG)</label>
<input id="weight" name="weight" type="number" min="0" value="0.01">
<span>Please, provide weight</span>
</fieldset>
<fieldset id="Furniture-info">
<label for="height">Height (CM)</label>
<input id="height" name="height" type="number" min="0" value="0.01">
<label for="width">Width (CM)</label>
<input id="width" name="width" type="number" min="0" value="0.01">
<label for="length">Length (CM)</label>
<input id="length" name="length" type="number" min="0" value="0.01">
<span>Please, provide dimensions</span>
</fieldset>
<span id="input-warning"></span>
<div id="sku-taken-values-container">
<?php
require('./scripts/database.php');
$database = new DatabaseActivity();
$database->outputAllSkuTakenValues();
?>
</div>
</form>
</section>
<footer>
Scandiweb Test assignment
</footer>
</body>
</html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="./scripts/add-product.js"></script>