bigguy
Retired
- Messages
- 10,984
- Reaction score
- 10
- Points
- 38
hows this then
I found this to maybe it will be useful....and again I`m just trying to help. This is were I got it from http://scripts.franciscocharrua.com/login.php
<?
function isLogged($UserName, $PassWord, $LogInPage)
{
//Without this, PHP will create a local
//variable called $HTTP_COOKIE_VARS.
global $HTTP_COOKIE_VARS;
$Entered_UserName = "";
$Entered_PassWord = "";
if(isset($HTTP_COOKIE_VARS["UserName"]) &&
isset($HTTP_COOKIE_VARS["PassWord"]))
{
$Entered_UserName = $HTTP_COOKIE_VARS["UserName"];
$Entered_PassWord = $HTTP_COOKIE_VARS["PassWord"];
}
if($Entered_UserName != $UserName || $Entered_PassWord != $PassWord)
{
//$LogInPage should be the name of an existing file
//with alternative web content. If you don't wish to
//provide such content, just pass the empty string.
if($LogInPage != "") include($LogInPage);
return(false);
}
else
return(true);
}
?>
<form name="login">
<table align="center" cellpadding="10" cellspacing="0" border="1">
<tr>
<td>User Name </td>
<td><input type="text" name="UserName" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="PassWord" /></td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="button" value="log in"
onclick="document.cookie = 'UserName=' + document.login.UserName.value;
document.cookie = 'PassWord=' + document.login.PassWord.value;
document.EmptyForm.submit();">
</td>
</tr>
</table>
</form>
<form name="EmptyForm" method="post">
</form>
I found this to maybe it will be useful....and again I`m just trying to help. This is were I got it from http://scripts.franciscocharrua.com/login.php