I have an external forum login form on my website but after logging in I would like users to redirect back to the exact website page that the visitor was looking at before logging in.
The thing I use:
<script>
function goBack()
{
window.history.go(-1)
}
</script>
<form action="./forum/ucp.php?mode=login" method="post">
<fieldset>
<label for="username">Name:</label><br>
<input type="text" name="username" id="username" size="20" class="input"><br>
<label for="password">Password:</label><br>
<input type="password" name="password" id="password" size="20" class="input"><br>
<label for="autologin">Remember<input type="checkbox" name="autologin" id="autologin"></label><br>
<input type="hidden" name="redirect" value="goBack()">
<input type="submit" name="login" value="Log in" class="button">
</fieldset>
</form>
However, the browser redirects to:
http://www.mysite.com/forum/goBack()?sid=87b53e6ecb0ae9062a3a9b930
I only manage to redirect to the index of my website:
value="http://www.wow.com">
Who will help me out :)?