diff --git a/create_category.php b/create_category.php
new file mode 100644
index 0000000..e098cf0
--- /dev/null
+++ b/create_category.php
@@ -0,0 +1,20 @@
+
+
+
+
+ Create New Category
+
+
+
+
+
\ No newline at end of file
diff --git a/css/main.css b/css/main.css
new file mode 100644
index 0000000..deb0dba
--- /dev/null
+++ b/css/main.css
@@ -0,0 +1,9 @@
+:root {
+ --main-bg-color: #D3D3D3;
+ --main-font-color: #006400;
+}
+
+body {
+ background-color: var(--main-bg-color);
+ color: var(--main-font-color);
+}
\ No newline at end of file
diff --git a/db/category.php b/db/category.php
index e7e7b67..1c01b3e 100644
--- a/db/category.php
+++ b/db/category.php
@@ -1,8 +1,25 @@
close();
+
+ return $items;
}
+ function create_category($name)
+ {
+ global $conn;
+ $statement = $conn->prepare("INSERT INTO `category` (category_name) VALUES (?)");
+ $statement->bind_param("s", $name);
+ if($statement->execute() == true){
+
+ }
+
+ $statement->close();
+ $conn->close();
+ }
?>
\ No newline at end of file
diff --git a/db/db.php b/db/db.php
index 567aa18..9c7d146 100644
--- a/db/db.php
+++ b/db/db.php
@@ -4,6 +4,6 @@
$password = '1a9t7y';
$db_name = 'inventory';
- $db = mysqli_connect($host, $user_name, $password, $db_name) or die("Failed to
- connect to MySQL: " . mysqli_error($db));
+ $conn = mysqli_connect($host, $user_name, $password, $db_name) or die("Failed to
+ connect to MySQL: " . mysqli_error($conn));
?>
\ No newline at end of file
diff --git a/db/item_info.php b/db/item_info.php
new file mode 100644
index 0000000..7692f8e
--- /dev/null
+++ b/db/item_info.php
@@ -0,0 +1,14 @@
+close();
+
+ return $data;
+ }
+?>
\ No newline at end of file
diff --git a/index.php b/index.php
index a3583bf..0768e9b 100755
--- a/index.php
+++ b/index.php
@@ -1,29 +1,17 @@
num_rows == 0){
- header("Location: create_category.php");
- exit(); //It's good practice to call exit() after a redirect so nothing else gets executed.
- }
- while($row = mysqli_fetch_array($categories))
- {
-
- }
+ $categories = get_item_base_attributes();
+ foreach($categories as $cat){
+ echo $cat["COLUMN_NAME"];
}
- else{
- echo "Error";
- }
-
- $db->close();
?>
-
+
diff --git a/website.code-workspace b/website.code-workspace
new file mode 100644
index 0000000..68ec977
--- /dev/null
+++ b/website.code-workspace
@@ -0,0 +1,8 @@
+{
+ "folders": [
+ {
+ "path": "."
+ }
+ ],
+ "settings": {}
+}
\ No newline at end of file