I created a login form that works great. But I realized the page my user is directed to can still be accessed by anybody. How do I protect the page being accessed only vie
Every of your page should start with
session_start();
and you should not be using session_register( "variablename" ) as of PHP version 4.2, use
session_register( "variablename" )
$_SESSION["variable"] = value;
so example page with is-logged-it checking would be:
and logging-in script: