Hi, i have a really confusing problem....
I have a config.php file where variables such as database settings can be set. This config.php file is inserted into every file like this;
include("http://www.pagadoo.com/pagadoo_config.php");
the file pagadoo_config.php looks like this;
=============
<?php
$title = "The Pagadoo! Job & Recruitment Network";
$DBhost = "localhost";
$DBuser = "username";
$DBpass = "password";
$DBname = "pagadoo";
$dt = date("m d y HⓂs");
$Header = "http://www.pagadoo.com/header.php";
$Footer = "http://www.pagadoo.com/footer.php";
$Start_Page = "http://www.pagadoo.com/php/index.php";
$log_ip = $REMOTE_ADDR;
$page = $PHP_SELF;
$to = "j.dunn5@ntlworld.com";
include($Header);
$cn = mysql_connect($DBhost,$DBuser,$DBpass) or die("Error Connecting To Database!");
mysql_select_db ($DBname);
?>
but... when i try to query like this
=====
echo "<SELECT NAME='county'>";
$sql = mysql_query("SELECT * FROM county",$cn);
while($row = mysql_fetch_array($sql)) {
echo "<option value='$row[county]'> $row[county]";
}
echo "</select>";
it doesnt seem to recognise the $cn variable(which is of course the database connection string. I know 100% that the query abbove is correct, and i am now done for ideas. Is it a bug or just me🙁
Jonathan