A web site I'm trying develop has several pages that won't open unless the user is logged in. If not logged in, the user is redirected to a login page that tells the user why they were reditrected.
Prior to the redirection, a SESSION variable stores the path back to the page the user was redirected from.
The user gets to login (user name & password), clicks 'Submit', gets a message that the login was valid.
Then if the user clicks the 'Return' button, I want him returned to the calling page, whichever one it was.
I have tried multitudes of keystrokes to try to make this work, too many to post them all but most are a variation of this:
<input type="submit" class="submit_button" value=" Back " onclick="location.href = <?php echo $linkback; ?> style="font-weight: 700" />
$linkback is the SESSION variable that was set previously pointing back to the calling page. The SESSION data is correct, there is no error, it just refreshes the login page.
Also, the 'Back' fucntion using 'history(-1)' doesn't work because the previous page is not n the history after the redirect to the login page.
Any help would be appreciated.