Added a class to retrieve the basic item information data.
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user