You can also avoid these errors by prefixing your variables like so: > if(@$user1==$USER && @$password1==$PASSWORD) {
This has the advantage of skipping the error on this occasion rather than for all. dan "Nicole Amashta" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In your php.ini, replace your error_reporting line with this one: > > error_reporting = E_ALL & ~E_NOTICE > > That should get rid of the warnings since pre-defining vars in PHP isn't > really required (as in Java). > > Good luck, > ~Nicole Amashta > www.aeontrek.com > > > "Bz" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello everyone, > I have a small question: > How can I get rid of "Warning: Undefined variable: user1(& password1) in > C:\WebShare\wwwroot\netk\5\login.php on line 4" in that program? > > <?php > include ("config.php"); > session_register("userpassword"); > if($user1==$USER && $password1==$PASSWORD) { > $userpassword = $user1.$password1; > header("Location:index.php"); > exit(); > } > ?> > <HTML> > <HEAD> > <TITLE>login</TITLE> > <HEAD> > <BODY> > <FORM action="<? echo $PHP_SELF ?>" method="POST"> > <TABLE border="0" width="400"> > <TR> > <TD>account£º > <INPUT type="text" name="user1"> > <TD>password£º > <INPUT type="password" name="password1"> > </TD> > </TR> > <TR> > <TD> > <INPUT type="submit" value="login"> > <INPUT type="reset" value="cancel"> > </TD> > </TR> > </TABLE> > </FORM> > </BODY> > </HTML> > > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php