Ok i have a simple longin page and that page goes to a check in page and a denied page if the login is incorrect or if someone access the page without signing in
here is my check script in teh check in page
<?php
if (!isset($HTTP_COOKIE_VARS['user']) || $HTTP_COOKIE_VARS['user'] != "cascade"
{
header ("Location: denied.php"
;
}
?>
I have to have "cascade" in there as that is the username being passes...How would i set it up so that it is the username form filed instead (the form field name is fldUser)
i tried "$fldUser" but that didnt work
here is my form page cookie setter
<?php
if (isset($HTTP_POST_VARS['fldPass'])) {
setcookie("pass", $HTTP_POST_VARS['fldPass'], time()+86400*1);
}
if (isset($HTTP_POST_VARS['fldUser'])) {
setcookie("user", $HTTP_POST_VARS['fldUser'], time()+86400*1);
}
it is set to one day but Id rather it expire when the browser is closed how is that possible as well.
and here is my form
<form action="<?php echo $FF_LoginAction?>" method="POST" name="access" id="access">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="right" valign="middle" class="header">USERNAME</td>
<td align="left" valign="middle" class="header"> <input name="fldUser" type="text" id="fldUser" value="<?php echo $HTTP_COOKIE_VARS['user']; ?>"></td>
</tr>
<tr>
<td align="right" valign="middle" class="header">PASSWORD</td>
<td align="left" valign="middle" class="header"> <input name="fldPass" type="password" id="fldPass" value="<?php echo $HTTP_COOKIE_VARS['pass']; ?>"></td>
</tr>
<tr align="center" valign="middle">
<td colspan="2" class="header"> <input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>
Also by me echoing in the form the cookie var do i still need to have the first part of the form page (the cookie setter)
[Hammer]
Nike Failed Slogans -- "Just Don't Do It!"
here is my check script in teh check in page
<?php
if (!isset($HTTP_COOKIE_VARS['user']) || $HTTP_COOKIE_VARS['user'] != "cascade"
header ("Location: denied.php"
}
?>
I have to have "cascade" in there as that is the username being passes...How would i set it up so that it is the username form filed instead (the form field name is fldUser)
i tried "$fldUser" but that didnt work
here is my form page cookie setter
<?php
if (isset($HTTP_POST_VARS['fldPass'])) {
setcookie("pass", $HTTP_POST_VARS['fldPass'], time()+86400*1);
}
if (isset($HTTP_POST_VARS['fldUser'])) {
setcookie("user", $HTTP_POST_VARS['fldUser'], time()+86400*1);
}
it is set to one day but Id rather it expire when the browser is closed how is that possible as well.
and here is my form
<form action="<?php echo $FF_LoginAction?>" method="POST" name="access" id="access">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="right" valign="middle" class="header">USERNAME</td>
<td align="left" valign="middle" class="header"> <input name="fldUser" type="text" id="fldUser" value="<?php echo $HTTP_COOKIE_VARS['user']; ?>"></td>
</tr>
<tr>
<td align="right" valign="middle" class="header">PASSWORD</td>
<td align="left" valign="middle" class="header"> <input name="fldPass" type="password" id="fldPass" value="<?php echo $HTTP_COOKIE_VARS['pass']; ?>"></td>
</tr>
<tr align="center" valign="middle">
<td colspan="2" class="header"> <input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>
Also by me echoing in the form the cookie var do i still need to have the first part of the form page (the cookie setter)
[Hammer]
Nike Failed Slogans -- "Just Don't Do It!"