I have several error msg of: SecureStore Notice: Undefined index:
basically in my login system when it is not logged in this error appears in shopping cart qnd has no product appears this error.
(When you have a product in the cart (the error does not appear, because it has data in the mysql table) (When I am logged into the site, there is no error.)
code:
<div id="logobuscar">
<div id="wrapperlogo">
<div id="logo"><img src="images/logosecure.png" alt="SecureStore" height="120" width="120"></div>
<div id="buscar"> <?php
$sessao = $_SESSION['pedido'];
$consulta = $pdo->prepare("SELECT * FROM carrinho_temporario WHERE temporario_sessao =:ses");
$consulta -> bindValue(':ses', $sessao);
$consulta -> execute();
$linhas = $consulta -> rowCount();
?>
<p class="text-right "><a href="carrinho.php" class="color-white bgcolor-red font-text-light font-weight-heavy car_show">Carrinho(<?= $linhas ?>)</a></p><br>
</form></div>
</div>
</div>
<?php
if ($_SESSION['logged_in'] != true){
?>
<form action="login.php" method="post">
<label for="email">Email: </label>
<br>
<input type="text" name="email" id="email">
<br><br>
<label for="password">Senha: </label>
<br>
<input type="password" name="password" id="password">
<br><br>
<input type="submit" value="Entrar">
</form>
</div>
<?php
}
?>