Jaehoon Posted March 30, 2010 Share Posted March 30, 2010 Hello, I have a small script and I was wondering if there are any big con's about hard coding the admin username/pw into a variable @ config.php? Are there any major issues with this? Quote Link to comment https://forums.phpfreaks.com/topic/197017-hard-coding-usernamepassword/ Share on other sites More sharing options...
simshaun Posted March 30, 2010 Share Posted March 30, 2010 I would pre-hash the password, but other than that there is nothing wrong with it. Store it outside of the web root if you can. Is there a reason you don't want to use a database? Quote Link to comment https://forums.phpfreaks.com/topic/197017-hard-coding-usernamepassword/#findComment-1034261 Share on other sites More sharing options...
cunoodle2 Posted March 30, 2010 Share Posted March 30, 2010 Look into password protected directories and the .htaccess file. If you have something like cPanel it will do it for you. Will require zero coding on your part and secure (providing you are using a secure password ;-) ) Quote Link to comment https://forums.phpfreaks.com/topic/197017-hard-coding-usernamepassword/#findComment-1034348 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.