more Codebase cleanup and refactoring on files mathe.view.php and nav.php

This commit is contained in:
Patryk Hegenberg 2023-01-07 11:50:51 +01:00
parent cbabe10ee9
commit 3c2dc70254
5 changed files with 233 additions and 256 deletions

View file

@ -3,18 +3,5 @@ require 'functions.php';
require 'Database.php';
require 'router.php';
require 'Response.php';
//$username = 'appUser';
//$password = 'password';
//$config = require('config.php');
//$db = new Database($config['database'], $username, $password);
//$id = $_GET['id'];
// Variante 1
//$query = "SELECT * FROM posts WHERE id = ?";
//$posts = $db->query($query, [$id])->fetchAll(PDO::FETCH_ASSOC);
// Variante 2
//$query = "SELECT * FROM posts WHERE id = :id";
//$posts = $db->query($query, [':id' => $id])->fetchAll(PDO::FETCH_ASSOC);
// Beide Varianten machen inhaltlich das Gleiche.
// freie Wahl, welche der beiden Varianten bevorzugt wird.
//dd($posts);
//dd($posts);