How to create a PHP page only for registered users
I want to create a php page only for registered users with a package. It's possible to make this with a php script?
I had thought about doing something like this:
Code:
<?php
include("include/config.php");
if($Login)
{echo "content to registered users only";}
else
{echo "content to unregistered users";}?>
It seems that "$Login" variable is not the same that appears in login.php file.
Someone knows how to do this?
Thanks in advance.
Re: How to create a PHP page only for registered users
Re: How to create a PHP page only for registered users
Thank you, bplex.
But, what I want is create a php page only for registered members with a specific package, not for all registered members. It's possible make this with 2.6 version?
With this code the content is available for all registered members.
Code:
<?php
require("/path/to/include/config.php");
require("/path/to/include/function.php");
if (!isset($_SESSION['USERNAME'])) {
Header("Location: {$config['baseurl']}/login.php");
exit(0);
}
?>
<html>
<body>
<h1>Welcome to Members Area</h1>
</body>
</html>
Re: How to create a PHP page only for registered users
Yes, what you are wanting to do is possible as well. I can build something like that for you (it will probably run you around $25). Contact me through my website (in my signature) and let me know if you are interested.
Re: How to create a PHP page only for registered users
Thank you, bplex. I will contact you.