skein Posted August 14, 2008 Share Posted August 14, 2008 I have a small question. If I have a website that uses a php script that connect to a MySQL database and It uses a password, how do I hide the password from other people. Baseicly my question is what is the ussual way people hide it. Sorry if the question is dumb. Quote Link to comment Share on other sites More sharing options...
php_dave Posted August 14, 2008 Share Posted August 14, 2008 Use a config.php script.. something like <?php $server = "localhost"; $username= "username"; $password = "password"; ?> and then just include config.php in your main script. Quote Link to comment Share on other sites More sharing options...
Hooker Posted August 14, 2008 Share Posted August 14, 2008 also, php scripts are run server-side and can't be seen by looking at the source etc so unless you already have a security problem (ie. someones able to get access to the files etc) you're fine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.