General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old November 3rd, 2002, 04:30 PM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
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

Reply With Quote
  #2  
Old November 3rd, 2002, 04:58 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Quote:
$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.

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.




Reply With Quote
  #3  
Old November 3rd, 2002, 05:43 PM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
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.

Reply With Quote
  #4  
Old November 3rd, 2002, 06:10 PM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via Yahoo to fakker
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..?!
__________________
Matt 'Fakker' Facer

mattfacer.com

Reply With Quote
  #5  
Old November 4th, 2002, 08:29 AM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
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?

Reply With Quote
  #6  
Old November 4th, 2002, 08:33 AM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
nevermind

PHP Code:
 $_SERVER["QUERY_STRING"]; 

Reply With Quote
  #7  
Old November 4th, 2002, 08:44 AM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
I just slapped this code in my global config file,...works like a champ,...thanks dude

PHP Code:
 $_CONF['host']    = $PHP_SELF;
$_CONF['qstring']    = $_SERVER['QUERY_STRING'];
$_CONF['location']    = $_CONF['host']."?".$_CONF['qstring']; 

Reply With Quote
  #8  
Old November 4th, 2002, 05:59 PM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via Yahoo to fakker
sweet! no problem! glad it all worked out ok!!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Http_referer


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway