undefined variable
| From: | bz | Date: | Tue, 05 Feb 2002 08:06:38 +0000 |
| Subject: | undefined variable | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-11845@lists.php.net to get a copy of this message | ||
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>