Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-15-2010, 06:51 PM Login
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Hi peolple

Here I am again.

I have a login in a domain.com

In another words: website.com/headoffice/login.php

In this website.com I have 2 alias: website.co.uk and website.us.

In the website.com I register 2 users:

1 user that can enter only in website.co.uk and cannot enter in website.us,

and vice versa.


I need to make in one login the possibility of a user that is registered previously under website.co.uk, not to enter trough the same login in a another website.us

In another words when we type www.website.us/headoffice/login.php

the user registred under website.co.uk cannot enter.

In the data base table the table is only one (USERS) to register both users has the following columns:

id, country, name, username, password, iso, website

I hope that somebody will understand this.

Sorry peole.

lol

Thanks a lot
josil is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-15-2010, 07:52 PM Re: Login
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Add a field to the database indicating where the user can login and validate against that.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 04-15-2010, 09:33 PM Re: Login RESOLVED
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Quote:
Originally Posted by JeremyMiller View Post
Add a field to the database indicating where the user can login and validate against that.

Thanks a lot for your idea. I will propbably use in other situation. I manage to do it
I just add it this on top of login file:
$name=$_SESSION['name_sessao'];
$id_sessao=$_SESSION['id_sessao'];
$domain = $_SERVER['HTTP_HOST'];
include "domains.php";
include_once "call.inc.php";
include("../idiom/$idiom.inc");
Tht's all, because I made a domains.php stating the if's about the url's.
If website.us bla bla bla
It works fine

Thanks
josil is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Login
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.61170 seconds with 12 queries