Element is not displayed in Safari

0

Good morning,

I have the following problem in one part of the code, which is the following:

echo "<section class='hilo_paginacion'>";
echo "<div class='creacion_hilo'>";

if (isset($_SESSION['usuario']) AND count($todas_respuestas) == 0 AND $_SESSION['usuario'] == $hilo_asunto[0]['abierto_por'] ){
    echo "<p class='crear_hilo no_sesion'>RESPONDER</p>";

} else if (isset($_SESSION['usuario']) AND count($todas_respuestas) > 0)  {
    if ($todas_respuestas[count($todas_respuestas)-1]['quien_comenta'] == $_SESSION['usuario']) {
        echo "<p class='crear_hilo no_sesion'>RESPONDER</p>";
    }

} else {
    echo "<a class='crear_hilo' href='comenta.php?foro=" . str_replace(" ", "%",$foro) . "&subforo=" . $subforo ."&hilo=" . str_replace(" ", "%",$hilo_asunto[0]['asunto']) . "&id=" . $hilo_asunto[0]['ID'] . "'>RESPONDER</a>";
}

    echo "<div class='busqueda_hilo'>";
        echo "<input type='text' name='search_hilo' placeholder='Buscar en este hilo...'>";
        echo "<label class='fa fa-search' for='search_hilo'></label>";
    echo "</div>";
echo "</div>";

echo "<div class='paginacion_foro'>";

echo "</div>";

echo "</section>";

As I comment in the title of the question, the element <p> or <a> is not shown, depending on whether the answer is allowed or not. So many "echo" appear because it is inside PHP tags. It's the only thing that does not load on the page, but I do not understand the reason and I do not know what to touch. The item does not appear directly in the Safari browser code.

This is how it should look:

And that's how it looks in Safari:

I would appreciate any help.

    
asked by JetLagFox 26.03.2017 в 20:21
source

1 answer

1

I solved the error, it was not Safari's problem, rather a problem that I was just running away from a case that I had not contemplated. Curious that Firefox did not see the same problem ... Finally I solved it with the following code, adding an else else:

if (isset($_SESSION['usuario']) AND count($todas_respuestas) == 0 AND $_SESSION['usuario'] == $hilo_asunto[0]['abierto_por'] ){
    echo "<p class='crear_hilo no_sesion'>RESPONDER</p>";
} else if (isset($_SESSION['usuario']) AND count($todas_respuestas) > 0)  {
    if ($todas_respuestas[count($todas_respuestas)-1]['quien_comenta'] == $_SESSION['usuario']) {
        echo "<p class='crear_hilo no_sesion'>RESPONDER</p>";
    } else {
        echo "<a class='crear_hilo' href='comenta.php?foro=" . str_replace(" ", "%",$foro) . "&subforo=" . $subforo ."&hilo=" . str_replace(" ", "%",$hilo_asunto[0]['asunto']) . "&id=" . $hilo_asunto[0]['ID'] . "'>RESPONDER</a>";
    }

} else {
    echo "<a class='crear_hilo' href='comenta.php?foro=" . str_replace(" ", "%",$foro) . "&subforo=" . $subforo ."&hilo=" . str_replace(" ", "%",$hilo_asunto[0]['asunto']) . "&id=" . $hilo_asunto[0]['ID'] . "'>RESPONDER</a>";
}

It was my mistake. My apologies.

    
answered by 27.03.2017 / 05:06
source