Re: Undefined Variables

From: Date: Mon, 30 Oct 2000 20:25:46 +0000
Subject: Re: Undefined Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-22743@lists.php.net to get a copy of this message
put error_reporting(0) at the top of the page --Joe On Mon, Oct 30, 2000 at 02:13:52PM -0600, bradbunce wrote: > 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. ================================================================================ = Joe Stump joestump98@yahoo.com http://www.miester.org = ================================================================================ "Real programmers don't comment their code. It was hard to write, it should be hard to understand."

« previous php.general (#22743) next »