CSS does not load with link

Asked

Viewed 83 times

0

Hello, I am logging in and need to pass the logged in user to other pages.

I call the other page this way:

$url = 'cadastroFuncionario.php/nome='.$nome.'&id='.$idFuncionario.'';

But this page (cadastroFuncionario) does not load css. There is another way to pass the employee logged in to the other pages?

My code:

if ((isset($_POST["id"])) && (isset($_POST["senha"]))) {
    $idFuncionario = $_POST["id"];
    $senha = $_POST["senha"];
    $sql = "SELECT * FROM funcionario WHERE id = '$idFuncionario' AND senha LIKE '$senha' ";
    $q = mysqli_query($con, $sql);
    while ($registro = mysqli_fetch_array($q)){
        $nome = $registro["nome"];
    }

    if (is_null($nome)){
        echo "<script type='text/javascript'> window.alert('Usuario ou senha incorretos') </script>";
    } else {
        $url = "cadastroFuncionario.php/nome=" . $nome . "&id=" . $idFuncionario . "";
        echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL=' . $url . '">';
    }
  • When I call that link it does not load the CSS. Only the page appears without formatting. Tb I do not know if I am passing the correct employee

1 answer

0

use the following example:

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

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

Look at the ../ , Maybe the file is above the stylesheet file.

  • If I do this no page shows the css

  • So @Paloma try to use the header('Location: página.php'); for redirecting

Browser other questions tagged

You are not signed in. Login or sign up in order to post.