Thank you for replying Xenon.
I simply do not know much about database connections, so am unsure as to the correct way of connecting 2 databases.
Would the following constitute a safe connection?
Code:
//connecting to second database
$dbtest = @mysql_connect("host","name","pass",true) or die ("no connection possible");
mysql_select_db("database",$dbtest) or die ("no db");
$a = mysql_query("
SELECT something
FROM " . TABLE_PREFIX . "sometable
");
while ($row = mysql_fetch_assoc($a))
{
foreach ($row as $field_name => $field_value)
echo $field_name . " : " .$field_value;
}
mysql_close($dbtest);
This must not be a very exciting topic to most people but I would like to know whether I am doing it right. Since this code and related password are in a PHP file, I assume no one visiting my site (viewing the results from that php file) can actualy view the code itself.
Thanks in advance.