|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Http_referer
heres a good question,.......I am sure that most of you guys are using a login.php or some other page that process's you users when they login.
Question, how to you return them to the page they were on after they login? $HTTP_REFERER isn't a good way,....because if it takes the user 3 trys to get the username/password correct, the $HTTP_REFERER would be the same login.php page. any ideas? -- Jason |
|
#2
|
|||
|
|||
|
Quote:
HTTP_REFERER isn't good for anything now. Track it through sessions.....
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
|
#3
|
|||
|
|||
|
how do you get the entire address/location? like profile.php?uid=54 or whatever,.... $PHP_SELF will only grab profile.php not the args after it.
|
|
#4
|
|||
|
|||
|
hey Taelo....
if you had the script like: admin.php?uid=59&myname=fakker&Ilove=beer the following can be done like: $SCRIPT_NAME would return /admin.php $QUERY_STRING would return everything after the ? ... so it would return "uid=59&myname=fakker&Ilove=beer" As for the login situation... simply use a variable which grabs the above and stores it in to $lastpage or something.. then when they login, simply do a "header(location: $lastpage)" then the user will go back to the last page they were on before they were on the login page... hope that helps some..?! |
|
#5
|
|||
|
|||
|
I know what you mean by $QUERY_STRING but isn't there another way of getting that? isn't that stuff part of the $SERVER globals or something?
|
|
#6
|
|||
|
|||
|
nevermind
![]() PHP Code:
|
|
#7
|
|||
|
|||
|
I just slapped this code in my global config file,...works like a champ,...thanks dude
![]() PHP Code:
|
|
#8
|
|||
|
|||
|
sweet! no problem! glad it all worked out ok!!
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Http_referer |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|