Connection to SQL DB within PHP page

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
dvergatal
Forum Newbie
Posts: 4
Joined: Sat Jun 04, 2005 4:06 pm

Connection to SQL DB within PHP page

Post by dvergatal »

Hello there. I have a page of PHP code that retrieves information and formats it as desired from a SQL_DB table. I know that before retrieving this information a connection must be made to the SQL DB using a username/password. The site is currently only local and i have the connection information in the same page that retrieves and formats the table data. This website is soon to go live on the Internet and so I cannot leave this information at the top of this public page. Can someone provide me with a secure solution to this problem? e.g. Will I have to put the connection data in another file and have it somehow retrieve it from this to connect?

Thankyou in advance. And hello everyone, i'm new here =)
Post Reply