Undefined index: Cookie (NOT POSIBLE?)
Posted: Sat Apr 17, 2004 3:24 pm
Hi!
I have Login.htm and Login.php pages. Login.htm Look like this:
I have one checkbox named Cookie and it hase value True and it is checked by default, but the problem is this: When I uncheck it and click login, I get error: Notice: Undefined index: Cookie in c:\inetpub\wwwroot\login.php on line 5
Why does it looses index when I uncheck it?? what is wrong?? I just request it from Login.php like this: $set_cookie = $_POST["Cookie"];
Thank You!
I have Login.htm and Login.php pages. Login.htm Look like this:
Code: Select all
</head>
<body>
<form name="form1" method="post" action="login.php">
<p> </p>
<p> </p>
<p> </p>
<table width="212" border="0" align="center" cellpadding="2" cellspacing="0" bordercolor="#F3F3F3" class="style2">
<tr bgcolor="#F3F3F3">
<td width="79" bgcolor="#F3F3F3"><div align="right"><span class="style4">username:</span></div></td>
<td width="153"><input name="txtusername" type="text" class="style2" id="txtusername"></td>
</tr>
<tr bgcolor="#F3F3F3">
<td bgcolor="#F3F3F3"><div align="right"><span class="style4">password:</span></div></td>
<td><input name="txtpassword" type="password" class="style2" id="txtpassword"></td>
</tr>
<tr bgcolor="#F3F3F3">
<td bgcolor="#F3F3F3"><div align="right">
<input name="Cookie" type="checkbox" class="style2" id="Cookie" value="True" checked>
</div></td>
<td>Give me a cookie </td>
</tr>
<tr bgcolor="#F3F3F3">
<td> </td>
<td><input type="image" value="submit" img src="Images/login.bmp"></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>Why does it looses index when I uncheck it?? what is wrong?? I just request it from Login.php like this: $set_cookie = $_POST["Cookie"];
Thank You!