Jump to content

[SOLVED] Storing database info in another file


blink359

Recommended Posts

I wanted to store my database info in another file lets say config.php so i put my db info in like so

<?php

$dbhost = "localhost";      //database host goes here

$dbuser = "your_user";        //database user goes here

$dbpass = "your_password";  //database password goes here

$dbname = "logon";      //database name goes here

?>

and in the page i want to include it i put

include("config.php");

 

But when i went on the page i used the include it had just echoed my database info on the page what have i done wrong

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.