-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
add-item.php
39 lines (36 loc) · 1.08 KB
/
add-item.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
<?php
if(!isset($_SESSION)) {
session_start();
}
if (!empty($_SESSION['username'])) {
}
else {
header('Location: log-in.php');
}
include ('inc/db_con.php');
include ('inc/account-info.php');
$pageTitle="Add Item";
include ('inc/head.php');
?>
<div class="row content-area">
<div class="col-xs-5">
<p class="steps">Step 1 of 2</p>
<h1>Add Item</h1>
<h3>What category are we adding to?</h3>
<form action="add-item-step-2.php" method="POST">
<div class="form-group">
<select class="form-control" name="category" required>
<option value="">Choose One</option>
<?php
$categories = mysqli_query($con, "SELECT * FROM categories ORDER BY category");
while ($row = mysqli_fetch_array($categories)) {
echo '<option value="' . $row['id'] . '">' . $row['category'] . '</option>';
}
?>
</select>
</div>
<button class="btn btn-success" type="submit" name="submit">Next <i class="fa fa-forward"></i></button>
</form>
</div>
</div>
<?php include ('inc/footer.php'); ?>