From 353a66350110fa2ec19a8d0850b97fd5d26cc6b0 Mon Sep 17 00:00:00 2001 From: Garritt Date: Mon, 30 Mar 2020 22:03:06 -0500 Subject: [PATCH] Initial commit --- .vscode/launch.json | 22 ++++++++++++++++++++++ db/category.php | 8 ++++++++ db/db.php | 9 +++++++++ index.php | 31 +++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 db/category.php create mode 100644 db/db.php create mode 100755 index.php diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..612eaac --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for XDebug", + "type": "php", + "request": "launch", + "port": 9000 + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 9000 + } + ] +} \ No newline at end of file diff --git a/db/category.php b/db/category.php new file mode 100644 index 0000000..e7e7b67 --- /dev/null +++ b/db/category.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/db/db.php b/db/db.php new file mode 100644 index 0000000..567aa18 --- /dev/null +++ b/db/db.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100755 index 0000000..a3583bf --- /dev/null +++ b/index.php @@ -0,0 +1,31 @@ +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)) + { + + } + } + else{ + echo "Error"; + } + + $db->close(); +?> + + + + + + + + + \ No newline at end of file