Hi!
I have a small script in wich i want to echo the content of my var $MySQL_Host. As u can see there are 3 points where i told the script to output the var. But only the last one works. The echo commands inside my connect - function don't work. What did i do wrong? thx tim
<? //db_connection.php
//include("connection_data.php")
global $MySQL_Host, $MySQL_User, $MySQL_Passw;
$MySQL_Host="localhost";
$MySQL_User="admin";
$MySQL_Passw="admin";
$dblk=connect();
function connect() {
if (! $linkid=mysql_connect("$MySQL_Host","MySQL_User","$MySQL_Passw")) {
echo "Die Verbindung konnte nicht hergestellt werden<br>";
echo $MySQL_Host;
exit;
}
echo "Es funzt zu";
echo $MySQL_Host;
return $linkid;
}
echo $MySQL_Host;
?>