Added a class to retrieve the basic item information data.

This commit is contained in:
2020-04-06 11:51:45 -05:00
parent 353a663501
commit 257d442f40
7 changed files with 79 additions and 23 deletions
+7 -19
View File
@@ -1,29 +1,17 @@
<?php
include_once "db/db.php";
include_once "db/category.php";
//Use require for all DB interaction code
//https://stackoverflow.com/questions/2418473/difference-between-require-include-require-once-and-include-once
require "db/item_info.php";
$categories = get_category_items($db);
if($categories){
if($categories->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();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>