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. Link to comment https://forums.phpfreaks.com/topic/119639-mysql_connect-security-question/ 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. Link to comment https://forums.phpfreaks.com/topic/119639-mysql_connect-security-question/#findComment-616386 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. Link to comment https://forums.phpfreaks.com/topic/119639-mysql_connect-security-question/#findComment-616388 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.