PHP-Code:
function connect()
{
echo '$Host: -'.$Host.'-<br />';
echo '$User: -'.$User.'-<br />';
echo '$Pass: -'.$Pass.'-<br />';
$db=mysql_connect($Host,$User,$Pass) or die(mysql_error());
mysql_select_db('usr_web25_2',$db) or die(mysql_error());
}
ich trau mich fast zu wetten, dass es so aussieht
Code:
$Host: -- $User: -- $Pass: --
PHP-Code:
function connect()
{
global $Host, $User, $Pass;
$db=mysql_connect($Host,$User,$Pass) or die(mysql_error());
mysql_select_db('usr_web25_2',$db) or die(mysql_error());
}
PHP-Code:
function connect()
{
$db=mysql_connect($GLOBALS['Host'],$GLOBALS['User'],$GLOBALS['Pass']) or die(mysql_error());
mysql_select_db('usr_web25_2',$db) or die(mysql_error());
}
Kommentar