Hi, I try to get the username in a session var but it doesn't work ... the session var should be the URL for the action field in the form ...
here is the code snippet
Thanx in advance
session_start();
// HTML stuff
<form name="password_check" method="post" action="<?echo $go?>">
<?
$reader = "pass.txt";
$fp = file($reader);
for($i=0; $i<count($fp); $i++)
{
$usern = trim($fp[0]);
$passw = trim($fp[1]);
}
if($user == $usern && $pass == $passw)
{
$go = "www.blub.de";
session_register("go");
print "<font color=green size=4><b>Access granted</b></font>";
}
elseif(empty($user) && empty($pass))
{
print"";
}
elseif(empty($user))
{
print "<font color=red size=3><b>Enter Username</b></font>";
}
elseif(empty($pass))
{
print "<font color=red size=3><b>Enter your Password</b></font>";
}
elseif($user != $usern)
{
print "<font color=red size=3><b>Username incorrect !</b></font>";
}
elseif($pass != $passw)
{
print "<font color=red size=3><b>Password incorrect !</b></font>";
}
?>
</form>
// HTML stuff