|
|
#1 |
|
Senior Member
Join Date: Mar 2006
Location: Lille (France)
Posts: 120
Rep Power: 16 ![]() |
I've a particular question for you :
If you go to my test website (http://www.tout-sur-ma-ville.com/annoncesv3/index.php), you'll see that the login form is placed in the 'layout'. (A member can login whenever s/he wants) The problem is : when a member logs in, s/he's automatically redirected to 'userindex.php'. I thing it would be better for the member to stay in the same page. Example : I'm viewing the member #3 (http://www.tout-sur-ma-ville.com/ann...r.php?member=3). I want to place a review about him, but it's only allowed if I'm logged. I enter my screenname (test59) the password (mypass), -today, I'm redirected to userindex.php, and I have to find again the page... -The goal : stay in the same page. Who has the solution (is it possible) ? Can it cause some problems with caching ? If you have an answer, don't hesitate ! Pascal
__________________
68classifieds (V4.0.9Developer) Last edited by frommarcq; 05-12-2006 at 02:14 PM. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Mar 2006
Location: Great Ocean Road - Australia
Posts: 741
Rep Power: 28 ![]() |
That sounds like a very reasonable and practical idea.
__________________
Chaslie V4.1 dev 68 Classifieds Important Links Customer Area | Issue Tracker | User Manuals & Documentation HTML Help W3 Schools |
|
|
|
|
|
#3 |
|
Moderator
|
You can manipulate the redirect from userlogin.php. You might just redirect to the referrer.
Here is the part you would edit. PHP Code:
__________________
John Snyder PHP Developer |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2006
Location: Lille (France)
Posts: 120
Rep Power: 16 ![]() |
Thanks a lot John !!!
I replaced twice Code:
userindex.php Code:
getenv("HTTP_REFERER")
(it displays corrcetly but I want to be sure of what I've done...) Pascal
__________________
68classifieds (V4.0.9Developer) |
|
|
|
|
|
#5 |
|
Moderator
|
That looks good. I honestly had not used getenv('REMOTE_ADDR') just yet, I have always used $_SERVER["REMOTE_ADDR"].
__________________
John Snyder PHP Developer |
|
|
|
|
|
#6 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,075
Rep Power: 117 ![]() |
That does sound fine. I would just try and make sure they can't manually force the REFFER to something like the administraton. Which I believe the login system will not allow them to be logged in there it is a good idea to check.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#7 |
|
Moderator
|
What I did was check the referer and if it was usercheckout.php it would go back there otherwise it would send them to userindex.php.
__________________
John Snyder PHP Developer |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Mar 2006
Location: Lille (France)
Posts: 120
Rep Power: 16 ![]() |
Hi guys !
What do you think of this code ? PHP Code:
__________________
68classifieds (V4.0.9Developer) |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AOL Customers are not able to login? | zman78 | v3.1 Questions & Support | 11 | 05-24-2006 09:02 AM |
| Login Over and Over and Over | garysmith | v3.1 Questions & Support | 6 | 05-16-2006 07:55 AM |
| Cant login to my website with netscape navigator | zman78 | v3.0 Questions & Support | 2 | 04-19-2006 01:42 PM |