Database access - keeping it secure
I have a form that I want to store the input in a SQL database. How do I keep the database access secure? Do other web applications code the database signon and password in the program?
How do I keep the database access secure?
Keeping database access secure involves two things primarily:
1. Choosing a strong password. Ensure your database password is at least 8 characters and contains a combination of uppercase / lowercase / numbers / and special characters.
2. Ensuring your PHP code has built in checks for common hack techniques, such as code injection.
Please keep in mind that database security (and security in general) is a huge concept. If companies like Sony (playstation 3) YouTube can be hacked, it's a possibility than anyone can be hacked.
Do other web applications code the database signon and password in the program?
Yes, most php applications will store the database username and password either in the php code directly or in an include file, such as include.ini. If you're looking for a specific example, we actually have an online tutorial for using PHP to interact with a MySQL database.
I hope this helps point you in the right direction. Feel free to post any follow up questions in the comments at the bottom of this page.
Like this Question? Tweet