Mount page dynamically with PHP

1

I need to display different pages according to a value that comes from the URI, I made this code, it is not pointing out errors, but it also does not display the contents of h1.

<?php
  require_once"cabecalho.php";
  $plano = $_GET['plano'];
  if($plano == 'parcial'){ ?>
    <section class="plano-parcial">
      <h1>Plano parcial detalhes</h1>
    </section>
  <?php } ?>
    
asked by anonymous 25.06.2018 / 14:12

1 answer

1

Put these commands before require_once and see if any errors will appear.

error_reporting(E_ALL); 
ini_set('display_errors', 1);

I think your require_once is failing, but you are not set to display errors and / or notices. This is the only possibility of not showing your H1 in your code, other than the obvious (I believe it is not) of not being 'partial' in your GET

    
25.06.2018 / 14:22