Why is the page css not loaded when the url receives? id =

1

Good night guys have a php page that when it receives integer values via GET the css is not loaded only if the parameters? id = are not inserted the styling is loaded normally. What could be happening?

<?php
$idserie = (int)$_GET['id'];
include 'BD.php';
$consulta = mysqli_query($conect, "SELECT * FROM series WHERE id_serie = '$idserie'");
$row = $consulta->num_rows;

if ($row > 0) {
    while ($dados = $consulta->fetch_array()) {
        ?>
    <!DOCTYPE HTML>
    <html>

        <head>
            <link rel="stylesheet" type="text/css" href="css/styleinfo.css">
            <meta http-equiv="content-type" content="text/html; charset=UTF-8">



            <title><?php echo $dados['nome'] ?></title>
            <meta charset="UTF-8">
            <link rel="stylesheet" type="text/css" href="css/styleinfo.css">
        </head>

        <body>

            <!--Menu do site-->
            <!--Menu superior-->
            <div id="menusuperior">
                <div id="menusuperiordireito">
                    <form method="get" action="" class="menusuperiorsearch">
                        <input placeholder="Search" class="menusuperiorbox" name="search" type="text">
                        <input name="btnsearch" class="munusuperiorbtn" value="go" type="submit">
                    </form>
                </div>
            </div>
            <!--Menu lateral-->

            <div id="lateral">
                <div id="menu">

                    <div class="link-titulo"> <img src="imagens/guest_profile.png" class="photo" alt=""><br>Guest</div>             
                    <ul class="box">                    
                        <li><a href="#">Configurações da conta</a></li>
                        <li><a href="#">Histórico</a></li>
                        <li><a href="#">Favoritos</a></li>
                        <li><a href="#">Sair</a></li>
                    </ul>

                    <h3 class="link-titulo">Categorias</h3>
                    <ul class="box">                    
                        <li><a href="#">Anime</a></li>
                        <li><a href="#">Ação</a></li>
                        <li><a href="#">Drama</a></li>
                        <li><a href="http://insonia.hol.es/fic%C3%A7%C3%A3o.html">Ficção</a></li>
                        <li><a href="#">Suspense</a></li>
                        <li><a href="#">Terror</a></li>
                        <li><a href="#">Mais +</a></li>
                    </ul>

                    <h3 class="link-titulo">Contribuições</h3> 
                    <ul class="box">                    
                        <li><a href="#">Doar Bitcoin</a></li>                   
                        <li><a href="#">trasf. Payoneer</a></li> 
                        <!-- mais links --> 
                    </ul>

                    <!-- mais seções -->

                </div> <!-- /#menu -->
            </div>      <div>
            </div> <!-- /#lateral -->
            <!--Fim do menu do site-->

            <!--Vitrine da locadora-->
            <div id="vitrine">
                <div id="chamada">  <center> 
                        <a href="" class="capa"><img src="imagens/mr_robot.jpg" alt="" class="capa"></a>
                        <a href="" class="capa"><img src="imagens/mr_robot.jpg" alt="" class="capa"></a>
                        <a href="" class="capa"><img src="imagens/mr_robot.jpg" alt="" class="capa"></a>
                        <a href="" class="capa"><img src="imagens/mr_robot.jpg" alt="grimm.html" class="capa"></a>
                        <a href="" class="capa"><img src="imagens/mr_robot.jpg" alt="" class="capa"></a>
                        <a href="" class="capa"><img src="imagens/mr_robot.jpg" alt="" class="capa"></a>
                    </center></div> <center> 
                </center></div>

            <div id="capaserie">
                <img alt="" src="<?php echo $dados['urlcapa'] ?>" style="height:280px;width:195px;">
            </div>

            <div id="inforserieesquerdo">
                <h1><?php echo $dados['nome'] ?></h1>
                <h2>Ano: <?php echo $dados['ano'] ?> | Genero: Ação</h2>
                <h2>Som: Português</h2>
                <p  style="font-size: 15px;">
                    <?php echo $dados['info'] ?>
                </p>
            </div>

            <div id="temporada"> 
                <nav id="primary_nav_wrap">
                    <ul style="background-color: rgb(161, 157, 157);">
                        <li class="current-menu-item"><a href="#">Trailer</a></li>
                        <li>
                            <a href="#">1º Temporada</a>
                            <ul>
                                <li><a href="#">Episodeo 1</a></li>
                                <li><a href="#">Episodeo 2</a></li>
                                <li><a href="#">Episodeo 3</a></li>
                                <li><a href="#">Episodeo 4</a></li>
                            </ul>
                        </li>
                        <li>
                            <a href="#">2º Temporada</a>
                            <ul>
                                <li><a href="#">Episodeo 1</a></li>
                                <li><a href="#">Episodeo 2</a></li>
                                <li><a href="#">Episodeo 3</a></li>
                            </ul>
                        </li>
                        <li>
                            <a href="#">Download</a>
                            <ul>
                                <li class="dir"><a href="#">1º Temporada</a></li>
                                <li class="dir"><a href="#">2º Temporada</a></li>
                            </ul>
                        </li>
                    </ul>
                </nav>
            </div>

            <div id="movie">  
                <iframe height="284" width="468" src="<?php echo $dados['urltrailher'] ?>" frameborder="0" allowfullscreen></iframe>
    </div>

</body>
</html>
<?php

}

}

Apache2 php7.0 ubuntu 16.04LTS

    
asked by anonymous 22.05.2016 / 04:03

1 answer

1

This probably happens because you passed a relative link to the css, then when you change the url, css will not load. Change this:

     <link rel="stylesheet" type="text/css" href="css/styleinfo.css">

For ... for example:

<link rel="stylesheet" type="text/css" href="http://Localhost/Site/css/styleinfo.css">
    
22.05.2016 / 18:22