I am trying to make a simple script, but when I try to include the config file, it wont load.
Here is my code-
<?php
$config = include("http://MyWebSite/config.php");
$mysql = mysql_connect($host, $user, $pass);
if (!$mysql) { die(mysql_error()); }
$data = mysql_select_db($database);
if (!$data) { die(mysql_error()); }
?>
Try this:
Also, don’t assign it to a variable. You simply want to include the file in the script.