自己在学习过程中做了几个PHP页面,index.php, index1.php, index2.php... ... 想添加一个注册登陆系统,
除了注册页面,登陆页面,忘记密码页面,SESSION/COOCIE判断……还需要些什么? 我已经做了以下几个简单的PHP文件页面,login.php(登陆页面),  register.php(注册页面), forgotpassword.php(忘记密码), myaccount.php(用户登陆后账户状态,含session_start判断) 
session_start();
if (!isset($_SESSION['user']))
{
die ("Access Denied");
}
单个测试这些文件全部OK。login.php  按“登陆”后跳转到myaccount.php,按“注册”后跳转到register.php,按“忘记密码”后跳转到forgotpassword.php;在myaccount.php里按“登出”跳转回login.php
但是如何把他们集成到我的index.php页面里呢?即完成上面所有操作,全部在index.php主页上。并且index.php里共享myaccount.php里的session_start功能。
貌似不能简单的 include('login.php")  或者 header("Location: login.php") ……
<iframe>或者<div>又失去了登陆的效果。