Please help me.I am working on a shopping cart project.What i am trying is use a session variable.The problem is when the user is logged index can get the $_SESSION['valid_user'] variable without an error but unlogged user get an error message on the page like :
Code: Select all
Undefined index: valid_user in /opt/lampp/htdocs/practice/log/test/index.php
if I make two different page one for logged and another for unlogged it will work but that way my project will become double.I know there is some where a way but need help.
I am stacked at this point and can't go farther .Please help me.