Hi Friend,
Use this :
header('Location: '.$_REQUEST['from']);
It will work as the data 'from' is not posted but is sent into the url and is known as get method so better to keep yourself on safe side, use, $_REQUEST, yet you can also use $_GET
UPDATE 2:
I have found a problem, See the code inside login.php :
<form method="get" action="loginproc.php">
Username :<input type="Text" name="username" />
Password :<input type="password" name="password" />
<input type="hidden" name="from" value=<?php echo $_REQUEST['from']; ?>>
<input type="submit" value="Login">
</form>
As you can See I have added an extra hidden field which is posting the address of redirection alongwith the form so, now the error will not occur.
Also, you need a code revision, as this code is not very well implemented and I will suggest you to implement it correctly. You can use some data flowchart kind of diagram to see how the request will flow between the pages when a login event occurs, so that a user never fall into a loop wherein the browser says, "The Browser is redirecting in a way that it will never complete" So, better have a visual look of how the request flows between all the pages, it will become very easy then to handle such situations :-)
Hope it helped,
Regards
Tushar Srivastava