-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
42 lines (37 loc) · 1.28 KB
/
index.php
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<?php// This is the title?>
<h1>CRUD-Buster, made with PHP + MySQL</h1>
<p>Create, read, update, and delete records below</p>
<?php// This allows for READ functionality?>
<table class="table">
<?php// This thead section adds labels for each column?>
<thead>
<tr>
<th>Quantity</th>
<th>Price</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<?php include 'read.php'; ?>
</tbody>
</table>
<?php// This code makes up the basic interface for input according to the DB schema?>
<form class="form-inline m-2" action="create.php" method="POST">
<label for="name">Name:</label>
<input type="text" class="form-control m-2" id="name" name="name">
<label for="price">Price:</label>
<input type="number" step="any" class="form-control m-2" id="price" name="price">
<label for="quantity">Quantity:</label>
<input type="number" class="form-control m-2" id="quantity" name="quantity">
<button type="submit" class="btn btn-primary">Add</button>
</form>
</div>
</body>
</html>