Hi all

I use the classic following rows to connect to a mysql
database. I always put $passsword in clear in the php
connection file and I wonder whether there is a way to
have it in md5 so that someone reading the file could
not use it to connect to the db. I googled a bit but
find only threads explaining how to have password
saved in md5 inside a mysql table which is not I would
like to do



        function SQLConnect()
                $server_name = 'localhost';
                $db_name = 'cmsdb';
                $user_name = 'user';
                $password = 'clearpassword';

                if (!$dbconnect =
mysql_connect($server_name, $user_name, $password))
                        echo "Connection failed to the
host 'localhost'.";
                if (!mysql_select_db($db_name))
                        echo "Cannot connect to
database '.$db_name.'";

Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to