Re: Unknown vars and constants

From: Date: Fri, 11 May 2001 12:54:44 +0000
Subject: Re: Unknown vars and constants
References: 1 2  Groups: php.install 
Request: Send a blank email to php-install+get-3122@lists.php.net to get a copy of this message
This is just the start of a program:- <? include ('dumptable.php'); session_start(); # Config if (isset($EasyLogOut)){ session_unregister("EasyPASS"); session_unregister("EasyUSER"); session_unregister("EasySERVER"); session_unregister("EasyDB"); unset($EasyPASS); unset($EasyUSER); unset($EasySERVER); unset($EasyDB); # session_destroy(); } elseif (isset($login[username])) { #encrypt password for ($i=0;$i<strlen($login[password]);$i++) $login[password][$i]=$login[password][$i] ^ '*'; session_register("EasyUSER"); $EasyUSER=$login[username]; session_register("EasyPASS");$EasyPASS=$login[password]; session_register("EasySERVER");$EasySERVER=$login[db_server]; session_register("EasyDB");$EasyDB=$login[db_name]; } define ("DB_SERVER",$EasySERVER); # Server Name define ("DB_USER",$EasyUSER); # User Name define ("DB_NAME",$EasyDB); # database name $pass=$EasyPASS ; # Encrypted password ( xor '*') :-) #decrypt password for ($i=0;$i<strlen($pass);$i++) $pass[$i]=$pass[$i] ^ '*'; define ("DB_PASS", $pass); define ("QUERY_STR",stripslashes($q)); Running this gives the following errors:- Warning: Use of undefined constant username - assumed 'username' in c:\inetpub\wwwroot\index.php on line 17 Warning: Undefined variable: EasySERVER in c:\inetpub\wwwroot\index.php on line 28 Warning: Undefined variable: EasyUSER in c:\inetpub\wwwroot\index.php on line 29 Warning: Undefined variable: EasyDB in c:\inetpub\wwwroot\index.php on line 30 Warning: Undefined variable: EasyPASS in c:\inetpub\wwwroot\index.php on line 31 -- Ian Pawson ""Johannes Janson"" <johannes.janson@gmx.de> wrote in message news:9dghai$bu0$1@toye.p.sourceforge.net... > Hi, > > > I get lost of warnings about 'undefined variables' > > and 'unknown constats'. > > post some code. That's probably where the errors > come from. > > johannes > > > > -- > PHP Install Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-install-unsubscribe@lists.php.net > For additional commands, e-mail: php-install-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.install (#3122) next »