RevCMS Question [PHP RELATED]

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
yo

so I'm doing a shop on RevCMS root folder and I can't use $_SESSION and such. What shall I do to make it work?

Thanks.
 

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
Says undefined, like if(isset($_SESSION['user']['id'])) { echo ""; }

And {hotelName} , {username} is what i meant from such
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
Says undefined, like if(isset($_SESSION['user']['id'])) { echo ""; }

And {hotelName} , {username} is what i meant from such
hotelName and username are variables set in the class, while $_SESSION is a global php variable. If your session is not set - it means u r not logged in.
 

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
hotelName and username are variables set in the class, while $_SESSION is a global php variable. If your session is not set - it means u r not logged in.
well the code is:
PHP:
if(isset($_SESSION['user']['id'])) { include "pages/index.php"; }
else {
include ('pages/login.php');}
I have logged into hotel and still I get the login page. And - which files shall I include to hotrlname and username to work?
 
Last edited:

Users who are viewing this thread

Top