[thelist] MySQL, PHP, and passwords

Mike evolt at muinar.com
Tue Feb 22 12:10:38 CST 2005


At 11:29 22.02.2005 -0600, you wrote:
>$user="username";
>$password="password";
>mysql_connect(localhost,$user,$password);
>
>Which requires you to actually type your MySQL password right on the
>php file in cleartext.

Hi Bernardo

You could write your login code into an include file, like for
instance mysqllogin.inc., and put that into the root of your
server, below the public area. Then access your login script by
putting an include "/absolute/path/to/mysqllogin.inc"; on the
first line of your PHP pages... Et voilà!

Mike

_____  mike s. krischker  http://webdesign-schweiz.ch/
        webpro mailing list  http://webdesign-list.com/
        flashpro mailing list  http://flash-list.com/



More information about the thelist mailing list