如何将静态导航系统更改为PHP动态导航系统,以便从其他静态URL导航到动态URL?如何将静态导航系统更改为PHP动态导航系统?
例如,
以下会话变量基于登录重定向报头重定向认证的用户与存储在Mysql数据库他的ID值其中ID是主键lnked着陆页和具有相应的值1
header('Location: user.php?id=' . $_SESSION['user_id']);
上述头将用户重定向到下面的动态URL,
www.anysite.com/anydirectory/user.php?id=1
那里有一个NA vigation菜单一样,
<a herf="user.php"> User Account</a>
<a href="setting.php">User Setting</a>
<a href="profile.php">User profile</a>
<a href="logout.php">Log Out</a>
这里的导航链接,
<a herf="user.php"> User Account</a>
本身是用户成功登录后,谁已经被重定向到下面的动态链接/页面的静态目标链接/页,
www.anysite.com/anydirectory/user.php?id=1
现在,如何相应用户导航到该链接,
www.anysite.com/anydirectory/user.php?id=1
但不
www.anysite.com/anydirectory/user.php
从像其他的导航链接,
<a href="setting.php">User Setting</a>
<a href="profile.php">User Profile</a>
另外,我要如何改变以下静态导航链接,
<a herf="user.php"> User Account</a>
<a href="setting.php">User Setting</a>
<a href="profile.php">User profile</a>
到会话变量基于动态链接与经过身份验证的用户的相应ID值相关联,以便绝对链接看起来像,
www.anysite.com/anydirectory/user.php?id=1
www.anysite.com/anydirectory/setting.php?id=1
www.anysite.com/anydirectory/profile.php?id=1
因为所有的静态链接都是关于一个经过身份验证的用户而已?
注意:您可以在How to redirect the users to their id specific urls/landing pages after they log in?
由于检查登录会话提前任何帮助。
好吧,看你的其他问题,您同时拥有一个会话并与同USER_ID – OptimusCrime 2011-12-15 11:43:29