Re: [PHP] One last kick at the cat

2001-10-28 Thread Imar de Vries
Henrik Hudson wrote: > Inside your function define: > > global $server; > global $pass; > global $user; > etc > > It is using variables insides it's own scope and unless you have use > GLOBAL_VARIABLES defined in your php.config file, it won't go outside of it's > scope to look for values, he

Re: [PHP] One last kick at the cat

2001-10-28 Thread Kurt Lieber
On Sunday 28 October 2001 12:57 pm, you wrote: > It seems that when I try to connect to my database inside "function > Table_Title()", my function cannot read the values of $server, $user, > $pass, "$db or $table ??? you need to declare the variables as global. See below and also see the manua

Re: [PHP] One last kick at the cat

2001-10-28 Thread Henrik Hudson
Inside your function define: global $server; global $pass; global $user; etc It is using variables insides it's own scope and unless you have use GLOBAL_VARIABLES defined in your php.config file, it won't go outside of it's scope to look for values, hence they are getting asigned NULL and

[PHP] One last kick at the cat

2001-10-28 Thread jtjohnston
Sigh ... I have "functions.inc" in which I have Table_Title(). As soon as I put my database connection inside my function called Table_Title(), my database connection fails. (See second example below.) My database connection works fine whenever IT IS NOT inside "function Table_Title()". (See fi