Such a problem that 2 header.

The task is to change the header when entering.

Through php I call the second header. C help include.

And my first header is registered in index.php.

<header class="header"> <div> <?php include('navigation.php'); ?> </header> 

enter image description here

Is there something that removes the default header?

  • It is probably better to do an if inside of the navigation.php and check whether the user is authorized or not, and correspondingly that header and give. - Dmitry Miroshnichenko

2 answers 2

Create one file header.php, inside it write a check of the condition on which this or that leader should be given. And include the file in index.php and remove the html, which builds a standard header on all pages

    Be sure to delete? It is possible through CSS, for example, to assign different classes to the heads and hide the first one when entering.

      .page_header{ display:none; }