My questions is similar to return to previous url after login.
I changed login link from product detail page to the following:
<a href="login.php?accesscheck=<?php echo (urlencode($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):"")));?>">Login</a>
as you recommended from Pickle's post.
And I changed the form tage login.php page to the following:
<form action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>" method="post" id="WAATKLogInForm">
as you recommended from Piclke's post.
But I got the page not found error.
The url is as follows:
login.php?accesscheck=%2F%7Eclothw5%2FDetail%2FDress_Jumpsuit%2F12572.php%3F
Could you please help me?