How to mount an includes system with $ _GET

0

I wanted to make my site lighter, it has 7 pages to include all these pages in the home with the URL thus getting ?pagina=contato and so on all pages

    
asked by anonymous 06.10.2017 / 06:09

1 answer

3

Make it my friend

    <?php
$pagina = $_GET['pagina'];

   if($pagina == "contato"){
        include_once("Pages/contato.php");
   }elseif($pagina == "outra"){
       include_once("Pages/outra.php");
}
   ?>
    
06.10.2017 / 06:13