Part on rendering notes finished

This commit is contained in:
Patryk Hegenberg 2022-12-16 10:37:54 +01:00
parent efdfb02518
commit 3f7c7ef7dd
7 changed files with 58 additions and 4 deletions

11
controllers/note.php Normal file
View file

@ -0,0 +1,11 @@
<?php
$username = 'appUser';
$password = 'password';
$config = require('config.php');
$db = new Database($config['database'], $username, $password);
$heading = "Note";
$note = $db->query('select * from notes where id = :id', ['id' => $_GET['id']] )->fetch();
//dd($notes);
require "views/note.view.php";

11
controllers/notes.php Normal file
View file

@ -0,0 +1,11 @@
<?php
$username = 'appUser';
$password = 'password';
$config = require('config.php');
$db = new Database($config['database'], $username, $password);
$heading = "My Notes";
$notes = $db->query('select * from notes where user_id = 1')->fetchAll();
//dd($notes);
require "views/notes.view.php";