That gives me a php error pointing exactly to the line where I added the code you told me to put there. So what should I change it to?
This is the error: Parse error: syntax error, unexpected ';'
EDIT: I figured it out. You added an extra ';' - it should be: ?accesscheck=<?php echo($_SERVER['PHP_SELF']); ?>
It works fine now.

<a href="login.php?accesscheck=<?php echo($_SERVER['PHP_SELF'];); ?>">Login</a>
This will pass the currant page in the accesscheck url variable so that login will send you back there.
