Old 07-10-2005   #1 (permalink)
Registered User
 
Join Date: Jun 2005
Posts: 9

Universal password for Membership Script

Hi,

Thanks for the great Membership Tutorial!

I was wondering if it's possible (and if so, how?) to make things so that after signing in users could travel to diferent subdomains without having to login again.

For example: Enter site sub.domain.com --> sign in --> go to sub2.domain.com = no re-sign in needed.

I would appreciate any help that you could give.

Thanks,
Jhon
jhon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-10-2005   #2 (permalink)
Sheep Worrier
 
Man1c M0g's Avatar
 
Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,073
Blog Entries: 14

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
My advice would be to use cookies instead of sessions (with a cookie domain of .domain.com, of course). This would probably require an extensive rewrite of the membership scripts though...
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-10-2005   #3 (permalink)
Registered User
 
Join Date: Jun 2005
Posts: 9

Hi, Thanks a lot for such a quick reply!

An Extensive rewrite may be a bit beyond me. I may end up moving all of the stuff to be password protected onto one of the subdomains .

Any other suggestions also appreciated.

Thanks,
Jhon
jhon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-10-2005   #4 (permalink)
Registered User
 
Join Date: Jun 2005
Posts: 9

Another question... Would it be difficult (for a beginner) to make a "save password & login name" feature to save the hassles of multi-signins?

Thanks,
Jhon
jhon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-11-2005   #5 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
In fact,i dont get ur question,but maybe i could help you :

1.
Why not use session?i think its a good idea,put a
PHP Code:
header("location:www.sub2.domain.com"); 
at the end of the sign in page to redirect to sub2 with all the session.

2.
"multi login" ,i dont get this point,if you want an anti-flooding ,just use some random number to prevent it.
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-12-2005   #6 (permalink)
Registered User
 
Join Date: Jun 2005
Posts: 9

Hi ParaSnake,

Thanks for the reply.

I have a diferent signin page for each subdomain (in different languages) and I would like to allow users that have signed in to be able to visit the other subdomains without having to login to each of them.

I'll have a look into "header("location:www.sub2.domain.com"); " and hopefully that will do the trick.

I'll let you know.

Thanks again, Jhon
jhon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-14-2005   #7 (permalink)
Registered User
 
Join Date: Jun 2005
Posts: 9

Hi again,

As you probably have guessed and I have found out, the "header("location:www.sub2.domain.com"); " wasn't what I was after. Thanks anyhow.

I've been checking around for a solution and have found a few questions from people who&ve been having the same sort of troubles, but I haven't yet found a that I understand!

If anyone out there could help I'd be very grateful!!!

Till then I'll keep looking.

Cheers,
Jhon
jhon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-14-2005   #8 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
I become to understand what you are trying to do
If this was not what you want,please let me know:
[quote]
- You want to create multiple log in page (use for Multiple language?)
- after the user has logged in,user will be transfered to the specified domain
[/quote[

This would be easy to solve if you know what session is,heres a quick and clean tutorial for you :
http://www.phpfreaks.com/tutorials/41/0.php

After reading it(it may cost only 10 mins,believe me,but it could longer depend on ur PHP version ) you will know what to do.

Note : If you intend to do it with another host(mean sub2.domain.com point to a file in another host,i suggest you burn it out and think of a new way.
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-15-2005   #9 (permalink)
Registered User
 
Join Date: Jun 2005
Posts: 9

Hi ParaSnake,

Thanks for your reply again. That tutorial was really great and gave me an understanding of sessions.

I have created mulitple login pages on diferent subdomains. I don't want the user to be redirected after login though. If the user chooses to visit another subdomain then they won't need to login again. Like the login session would valid for other subdomains.

This is what happens now:

1. User logs in to www.site.com
2. User goes to sub1.site.com
3. User must log in
4. etc

This is what I'm hoping to do:
1. User logs in to www.site.com
2. User goes to sub1.site.com
3. No log in because user already logged in on another area of the site.

So basically, once a user has logged in once they are free to travel to other protected areas (subdomains) without logging in again.

Any help would be appreciated and thanks again for the great tutorial.

Cheers,
Jhon
jhon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-15-2005   #10 (permalink)
Registered User
 
Join Date: Jun 2005
Posts: 9

Hi,

Thanks to everyone for their help.

I think that I've found an answer. I will test it a bit more but so far so good.

This was what I found: " ini_set ("session.cookie_domain",".my.site.com"); " with the dot before my.site.com doing the work. If things don't work out I'll let you know...

Cheers,
John
jhon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 08:32 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT