Re: Windows2000 OS - PHP 4.x - Warning: Undefined variable:

From: Date: Tue, 14 Nov 2000 14:41:02 +0000
Subject: Re: Windows2000 OS - PHP 4.x - Warning: Undefined variable:
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-3831@lists.php.net to get a copy of this message
Vasu wrote: > The variable $SearchValue is the name of a text box of HTTP Form. If there is a value in the > text box before the form is submitted, no error occurs. Problem is only when the element is empty > before the form is submitted. > > This program works fine on Linux OS but not on Windows 2000 OS. I have PHP 4.x installed on > both the operating systems. I am not sure whether I can use PHP 4.x on Windows2000 OS but it seems > okay other than this problem. Sounds to me like a php.ini issue.... Since this works on Linux and not on Win2K, you probably don't have the same settings in php.ini. In order for form vars to come in automatically as $formVariableName, make sure you have both register_globals and track_vars set to On in your php.ini. Just to double-check, try getting at your form variable this way... $HTTP_POST_VARS["formVariableName"] or $HTTP_GET_VARS["formVariableName"] - depending on whether the form was sent POST or GET. -- Andy Hoffman Web Developer Bristol-Myers Squibb email: andy.hoffman@bms.com

« previous php.windows (#3831) next »