Jump to content

user login - if user =xxx then login to table xxx


Grumps

Recommended Posts

I have no code yet that why I am posting this.

I need a login script something like this:

 

if user = xxx then

$db_host = "localhost";$db_user = "1234";$db_pass = "*******";$db_name = "1234";$db_table = "xxx";

else if

user = yyy then

$db_host = "localhost";$db_user = "1234";$db_pass = "********";$db_name = "1234";$db_table = "yyy";

else if

user = zzz then

$db_host = "localhost";$db_user = "1234";$db_pass = "********";$db_name = "1234";$db_table = "zzz";

else

user = '' then

$db_host = "localhost";$db_user = "1234";$db_pass = "********";$db_name = "1234";$db_table = "casual";

 

Trouble is I need to connect to the database to get the user then disconnect and reconnect to it with the correct table.

Also have not attempted to write the login script for the website as I think it might be all part of the same thing.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.