Hello, I'm logging in and I 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 the css.
Is there another way to get 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 . '">';
}