Hi ,
I tryng here to make my php read from a mysql database the username and password and then send the user to some page that i want .
Then i create the database called "mytest" into SQL with 5 fields.
1 - ID
2 - username
3 - password
4 - company
5 - area
--
I make a php login page where the use can enter his name and password .
After that we is sent to another one if the login/pass are correct . Ok that easy .
Now how can i put into the same php login page to check too company ?
I try this :
$sql = "Select $useridField from $userTable where $useridField='$Username' and $passwdField='$Password'
and $companyField='$company'";
What i'm looking for it's just a way to user in the login screen put his company too .
Then php will check " User + Login + company ". If correct he look the "area" field and send the user to there .
If not just send a error text .
With this i have 3 method of login because the user must put too the correct company where he belongs .
In the page of company i put a PHP script to check the userID and Company. If not the right one he send the user back to login screen . etc etc .
Can someone help here ??
Thanks .