mysqli_connect problem....
Posted: Thu Nov 10, 2005 7:36 am
hi folks.
i am a bloody php beginner and have some troubles.
when i trie to put my mysqli_connect into a separate function
ie. function db_connect() - i am not able to parse the ressource.
for example:
function db_connect()
{
$dbc = mysqli_connect("localhost", "user", "password", "db_name");
return $dbc;
}
$db_conn = db_connect();
is there any possibility?
thx, dieter
i am a bloody php beginner and have some troubles.
when i trie to put my mysqli_connect into a separate function
ie. function db_connect() - i am not able to parse the ressource.
for example:
function db_connect()
{
$dbc = mysqli_connect("localhost", "user", "password", "db_name");
return $dbc;
}
$db_conn = db_connect();
is there any possibility?
thx, dieter