I have this code:
include "config.php";
When I do this it gives me an error and won't run the script, when I use the code below it works fine (which is what is in config.php:
$link = mysql_connect("localhost", "database", "pass");
mysql_select_db("database", $link);
This is the code for the config.php file:
$host = "localhost";
$databasename = "databasename";
$databasepassword = "password";
$link = mysql_connect("$host", "$databasename", "$databasepassword");
mysql_select_db("databasename", $link);
The fields $host, $databasename and $databasepassword are all filled in correctly in the actual code.
Does anyone know why this is or how I fix it? Thanks for the help.