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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.