or simply declare your variables: var $user1, $password1; > > > 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(); > > } > > ?> >-[snip]- > >the proper way of doing this would be >if (isset($user1) && isset($password1) && $user1==$USER && >$password1==$PASSWORD) { >... > >Or you can just turn off warnings in php.ini, as Nicole suggests :) > >/Martin > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php >
_________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php