NYCPHP Meetup

NYPHP.org

[nycphp-talk] accessing phpmyadmin as different users

jon baer jonbaer at jonbaer.net
Fri Oct 17 15:13:36 EDT 2003


> config.inc.php I change the code to look like this:
>
> $cfg['Servers'][$i]['user'] = $_GET['userid'];
> $cfg['Servers'][$i]['password'] = $_GET['pwd'];

you don't really want to do this because there is no tracking for the
variable $i (in other words if you are including this file it will change
all of user/pass of every login if its included) ...

if on the other hand you are doing it individually you need to match up the
corressponding database w/ the correct user name/pass by the first reference
($i) ..

$cfg['Servers'][2]['user'] = $_GET['userid'], etc

im not sure if you looked closely @ the config file but you can have as many
configurations as you want, in mine i have 8 ... you can add a user/pass to
the form (custom) + do what you are looking to do but need to make sure to
pass a Server variable ...(which is $cfg['Server']).

- jon




More information about the talk mailing list