redirecting back to checkout.php after login
If a customer gets to checkout.php and then decides to log in, after logging in he is taken to the users_Profile.php page which has an "update button". Clicking the "Update" button takes him back to users_Profile.php when it needs to take him back to checkout.php. How do I fix this?
Thanks.
--rayne
Update: Answered in another post from Eric showthread.php?t=3523
-----------------------------------------------------------------------------
I think that the access check part of this is ok, it is not sending you back to this page though for another reason. On the login page the user login form submits to itself and does not include the query string that has the access check in it. To correct this and get the page to redirect to the access check parameter you will need to update the action of the login form.
On the login page in the form that has the id id="WAATKLogInForm" you will need to update the action. Replace what is currently set for the action with this:
<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>
Doing this along with adding in the access check value to the login page link on the checkout page should get you back to the checkout page after you login from it.
-------------------------------------------------------------------------------------
Also, I think this:
Is this the wrong account? Please <a href="users_LogIn.php">log in</a>
needs to change to this:
Is this the wrong account? Please <a href="users_LogIn.php?accesscheck=checkout.php">log in</a>