I have a login system that works fine. The only trouble is getting it to redirect to the page that you login at.
header.php is included in EVERY page on the site. It also has the login form in it. In header.php I have the following pieces of code (not next to each other)
<?
$url = $_SERVER['HTTP_HOST'];
$url = $url . $_SERVER['SCRIPT_NAME'];
echo $url;
?>
and....
<form method="POST" action="http://www.tycooneden.com/login.php">
<div align="left">
<input type="hidden" name="url" value="<?php echo ("$url");?>">
<table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="53%" id="AutoNumber5">
<tr>
<td width="17%"><b><i><font size="4" color="#333333">Login:</font></i></b><font color="#333333"><b> </b></font><font size="4" color="#333333"> </font></td>
<td width="15%"><font color="#333333"><b> User:</b></font></td>
<td width="19%"><input type="text" name="username" size="20"></td>
<td width="17%"><font size="4" color="#333333"> Password:</font></td>
<td width="16%"><input type="password" name="password" size="20"></td>
<td width="16%"><input type="submit" value="Login" name="B1"></td>
</tr>
</form>
Thus posting the refer information to login.php.
In login.php is the code:
header("Location: $url");
}
?>
But.. it doesn't want to redirect.
Any help would be greately appreciated...
A|ex