登录系统 [英] Login system
问题描述
Hi Group,
我有一个带有MySQL后端的站点。它有一个会员系统。
会员使用每个页面上显示的小型登录表格登录
(通过include())
如果会员登录,表单将消失,并且会显示一些额外的链接
而不是表单。
- 如果会员登录,我想重定向他们,如果成功,回到
他们登录的页面。
我应该使用额外隐藏的表格字段和
$ _SERVER [''request_uri'']或者我应该使用$ _SERVER [''http_referer'']?
- 在这两种情况下,我如何检查引用来自MY域名?
如果用户从 http://domain.com/登录page.php 我想发送给他们
回到该页面,而不是 http://www.domain.com/page.php 和
反之亦然。
我如何确定他们来自我的一个n个页面,并且它是'/ b $ b接受WITH和没有''www''前缀?
感谢您的帮助!
< br $>
Greetings Frizzle。
Hi Group,
I have a site with a MySQL backend. It has a member-system.
Members login with a small login-form that appears on every page
(via include())
If members are logged in, the form disappears and a few extra links
appear instead of the form.
- If members log in, i want to redirect them, if succesful, back to
the page they logged in from.
Should i use an extra hidden form-field with the
$_SERVER[''request_uri''] or sould i use the $_SERVER[''http_referer'']?
- In both cases, how can i check that the referer is from MY domain?
if users login from http://domain.com/page.php i want to send them
back to that page, and not to http://www.domain.com/page.php and
vice versa.
How do i make sure they come from 1 of my own pages, and it''s
accepted WITH and WITHOUT the ''www'' prefix?
Thanks for any help!
Greetings Frizzle.
推荐答案
_SERVER [''request_uri'']或者我应该使用
_SERVER[''request_uri''] or sould i use the
_SERVER [''http_referer'']?
- 在这两种情况下,我如何检查引用来自我的域名?
如果用户从 http://domain.com/page.php登录a>我想发送给他们
回到该页面,而不是 http://www.domain.com/page.php 和
反之亦然。
我如何确保他们来自1我自己的页面,并且它接受了没有''www''前缀的
?
感谢您的帮助!
Greetings Frizzle。
_SERVER[''http_referer'']?
- In both cases, how can i check that the referer is from MY domain?
if users login from http://domain.com/page.php i want to send them
back to that page, and not to http://www.domain.com/page.php and
vice versa.
How do i make sure they come from 1 of my own pages, and it''s
accepted WITH and WITHOUT the ''www'' prefix?
Thanks for any help!
Greetings Frizzle.
frizzle写道:
frizzle wrote:
我有一个带有MySQL后端的站点。它有一个会员系统。
会员使用每个页面上显示的小登录表单登录
(通过include())
如果会员登录,表单会消失,并且会有一些额外的链接
出现而不是表格。
- 如果会员登录,我想将它们重定向,如果成功,则返回
他们登录的页面。我应该使用额外的隐藏表单字段和
I have a site with a MySQL backend. It has a member-system.
Members login with a small login-form that appears on every page
(via include())
If members are logged in, the form disappears and a few extra links
appear instead of the form.
- If members log in, i want to redirect them, if succesful, back to
the page they logged in from.
Should i use an extra hidden form-field with the
这篇关于登录系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!