Part on rendering notes finished
This commit is contained in:
parent
efdfb02518
commit
3f7c7ef7dd
7 changed files with 58 additions and 4 deletions
11
controllers/note.php
Normal file
11
controllers/note.php
Normal 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
11
controllers/notes.php
Normal 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";
|
||||
Loading…
Add table
Add a link
Reference in a new issue