After logging on to php, the system returns to the page before logon. This post was last edited by cntegzs from 2012-11-2716: 45: 39. the following code returns to the page before logon: & lt; A & nbsp; onclickwindow. locationuserlogin. php? Url + encodeURIComponent
This post was last edited by cntegzs at 16:45:39, January 27 ,.
The following code returns to the page before logon:
Login
Because the logon page is:
User/login. php
If the following logon page is displayed:
Index. php? Mod = user & act = login
How can I return to the previous page after logon?
------ Solution --------------------
Index. php? Mod = user & act = login & url = xxx
You can pass the parameter in the GET method,
Of course, your controller must support redirection.
------ Solution --------------------
1. you can save the current url and use cookies on the front-end. there are more background forms, such as session or database or file.
2. link the current url to login,
'Index. php? Mod = user & act = login & url = '+ encodeURIComponent (window. location. href );
After successful login, jump to the path pointed to by this url