Secure connection to database

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Secure connection to database

Post by johnj » Sun Apr 28, 2013 1:55 am


swarups
New php-forum User
New php-forum User
Posts: 20
Joined: Tue Mar 06, 2012 11:05 pm

Re: Secure connection to database

Post by swarups » Sun Apr 28, 2013 9:39 pm

Hi,

Yes, it is safe to store db credentials in a different config.php file. But the config.php file should be in a different folder like configs or includes and wherever db connection is required include the config.php file.

You can also use PDO for secure db connection


Thanks
Swarup

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest