Re: [PHP-WIN] Global variables

2006-03-15 Thread Alf Stockton
Now if in PMConnect() I return $link(see example below); it works for me. global $dbservertype, $servername, $dbusername, $dbpassword, $dbname, $link; $link = mssql_connect("$servername", "$dbusername", "$dbpassword"); if (!$link) { sprintf($Message, "At %d in %s Could not

[PHP-WIN] Global variables

2006-03-15 Thread Alf Stockton
The following scenario has me confused. In my main program I have:- in an included function I have global $dbservertype, $servername, $dbusername, $dbpassword, $dbname, $link; $link = mssql_connect("$servername", "$dbusername", "$dbpassword"); if (!$link) { sprintf($Message

[PHP-WIN] Global variables x includes

2004-04-25 Thread Fábio Berbert de Paulaᢩo Berbert de Paula
Hi list, I'm having trouble to migrate a Linux site to Windows. For example, I have a include file that look like this: CUT - // useronly.inc if (!$_COOKIE['syslogin']) { header("Location: /expired.php"); exit; } CUT - When a page includes this file, it means that the user can na

Re: [PHP-WIN] Global Variables and Form Variables

2004-01-12 Thread Svensson, B.A.T. (HKG)
On Mon, 2004-01-12 at 15:43, Jim MacDiarmid wrote: > For some reason, the first time I attempt to access a form variable or > global variable PHP does not seem to think it's defined. For each one > that shows an "undefined" error, I've had to put the following code at > the beginning of the script

[PHP-WIN] Global Variables and Form Variables

2004-01-12 Thread Jim MacDiarmid
For some reason, the first time I attempt to access a form variable or global variable PHP does not seem to think it's defined. For each one that shows an "undefined" error, I've had to put the following code at the beginning of the script. Should I have to do this? I have the register_glob

[PHP-WIN] global variables headache

2002-04-01 Thread Jon Lauridsen
Hey all, I'm fairly new to PHP (heck, to programming heh), so my hopes is that this problem of mine is an easy one to solve. I also don't know how classic this question is, but I think it must be something that most come across at some point. I'm caught in the trap that is PHPs local variables.