Undefined Variables

From: Date: Mon, 30 Oct 2000 20:13:52 +0000
Subject: Undefined Variables
Groups: php.general 
Request: Send a blank email to php-general+get-22740@lists.php.net to get a copy of this message
I am running the same code on two different platforms. The production platform is RedHat Linux 6.2 with Apache 1.3.14 and PHP4 The development platform is NT 4.0 with Apache 1.3.14 and PHP4. PHP is working fine on both, however I am experiencing a "undefined variables" problem on the NT platform. Here is a sample piece of code: <FORM ACTION="login.php?do=authenticate" METHOD="post"> <?php if ($authenticated == "no") { echo ("<table width=640 border=0><tr><td><strong>Incorrect Username and/or Password. Please try again.</strong></td></tr></table>"); } ?> <table width="640" border="0"> <tr> <td> <table border=0> <tr> <td><strong>Username</strong></td> <td><input type="text" name="username" size="10" maxlength="10"></td> </tr> <tr> <td><strong>Password</strong></td> <td><input type="password" name="password" size="10" maxlength="10"></td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="Login" name="B1"> <input type="reset" value="Reset" name="B2"> </td> </table> </form> </td> </tr> </table> The Linux platform executes without error. The NT platform returns: Warning: Undefined variable: authenticated in login_form.php on line 4 Is there a setting in php.ini that I am overlooking? Why would I have to define variables on NT and not on Linux? Any help would be appreciated. Thanks.

« previous php.general (#22740) next »