Secure connection to database

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

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

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

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
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests