0
I would like when arriving at the page with session only one user with certain login but error when I access
php code:
if($_SESSION['login'] == 'admin')
{
echo "logado";
}
It gives error on the part of Session in if, as if it had not.
0
I would like when arriving at the page with session only one user with certain login but error when I access
php code:
if($_SESSION['login'] == 'admin')
{
echo "logado";
}
It gives error on the part of Session in if, as if it had not.
3
You have to put a condition for when enter it check if the Session exists, try:
if(isset($_SESSION['login']))
will probably solve
0
The correct is to check the isset and then compare the string
if(isset($_SESSION['login']) && $_SESSION['login'] == 'admin')
{
echo "logado";
}
Browser other questions tagged php session login
You are not signed in. Login or sign up in order to post.
that’s right! Thank you!
– user68945