I seem to be having problems with PHP code.. and I believe it may be because this particular server has register_globals turned OFF in the php.ini file.
The code is the following:
<?php
$db = array(host => "localhost", user => "username", pass => "password", database => "db");
mysql_connect($db[host], $db[user], $db[pass]);
mysql_select_db($db[database]);
unset($db);
?>
However when I do this I get "Notice: Use of undefined constant host - assumed 'host' in D:/ ... " and it gives an error for each associative array value I use.
Is there something I am doing wrong and/or a different way to program this?
Thanks!