Part on Forms finished

This commit is contained in:
Patryk Hegenberg 2022-12-19 08:54:06 +01:00
parent 672ef6a949
commit c0aeac2632
6 changed files with 54 additions and 12 deletions

View file

@ -1,16 +1,6 @@
<?php
$uri = parse_url($_SERVER['REQUEST_URI'])['path'];
$routes = [
'/' => 'controllers/index.php',
'/about' => 'controllers/about.php',
'/contact' => 'controllers/contact.php',
'/learn' => 'controllers/learn.php',
'/mathe' => 'controllers/mathe.php',
'/note' => 'controllers/note.php',
'/notes' => 'controllers/notes.php',
'/addition' => 'controllers/addition.php'
];
$routes = require ('routes.php');
function routeToController($uri, $routes) {
if (array_key_exists($uri, $routes)) {