How to make member area using PHP
To i tech you how to make a members area using php,html,bootstrap.......
<?php
include("database.php");
if(isset($_REQUEST['action'])){
session_destroy();
header("location:login.php");
}
// if not logged in or unauthorized access
if(!isset($_SESSION['name'])){
header("location:login.php");
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Member Area</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<a class="navbar-brand" href="#"><!--Project Name--></a> </div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Welcome <strong><?php echo @$_SESSION['name']; ?></strong></a> </li>
<li><a href="member_area.php?action=logout">Logout</a></li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
include("database.php");
if(isset($_REQUEST['action'])){
session_destroy();
header("location:login.php");
}
// if not logged in or unauthorized access
if(!isset($_SESSION['name'])){
header("location:login.php");
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Member Area</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<a class="navbar-brand" href="#"><!--Project Name--></a> </div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Welcome <strong><?php echo @$_SESSION['name']; ?></strong></a> </li>
<li><a href="member_area.php?action=logout">Logout</a></li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
Comments
Post a Comment