Commit bfaa212b361d7d293e4ad532412cf16ee12fc76b

Authored by Geoffrey PREUD'HOMME
1 parent 8485d451

$page definition more readable

Also caused a syntax error on Weppes, dunno why
Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
index.php
... ... @@ -2,8 +2,12 @@
2 2 session_start();
3 3 require_once("creds.php");
4 4  
  5 +$url = $_SERVER["REQUEST_URI"];
  6 +$parsedUrl = parse_url($url);
  7 +$path = $parsedUrl['path'];
  8 +$explodedUrl = explode('/', $path);
  9 +$page = end($explodedUrl);
5 10  
6   -$page = end(explode('/', parse_url(($_SERVER["REQUEST_URI"]))['path']));
7 11 switch ($page) {
8 12 case 'home':
9 13 case 'description':
... ...