Part on Escaping Chars finished
This commit is contained in:
parent
c0aeac2632
commit
a597943b45
3 changed files with 8 additions and 3 deletions
|
|
@ -1,6 +1,11 @@
|
|||
<?php
|
||||
$heading = 'Create Note';
|
||||
$username = 'appUser';
|
||||
$password = 'password';
|
||||
$config = require('config.php');
|
||||
$db = new Database($config['database'], $username, $password);
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] === 'POST'){
|
||||
dd($_POST);
|
||||
$db->query("INSERT INTO notes (body, user_id) VALUES (:body, :user_id)", ['body' => $_POST['body'], 'user_id' => 1]);
|
||||
}
|
||||
require 'views/note-create.view.php';
|
||||
Loading…
Add table
Add a link
Reference in a new issue