I want to redirect the user to the application form of the job he is applying to after successful login. I have a page on which the job description is showed and I want to check and redirect the user if he is not authenticated to the login/registration page and then continue back with the applying process. how should I achieve this?
Asked
Active
Viewed 93 times
0
-
what did you try in order to resolve this yourself? – Funk Forty Niner Apr 25 '17 at 18:25
-
http://stackoverflow.com/search?q=%5Bphp%5D+login+previous+page – Mike B Apr 25 '17 at 18:25
-
I thought of storing the last action, in this case, the id of the job he is applying too and the action i.e apply in a session variable and redirect to it after successful session creation. – PRASHANT Apr 25 '17 at 18:28
-
Just look at how stackoverflow does it if you try to ask a question without being logged in: https://stackoverflow.com/users/login?ssrc=anon_ask&returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2fask - See the returnurl param? – Mike B Apr 25 '17 at 18:36
-
@MikeB I guess it passes the last action as a parameter(returnurl) in the URL and redirects back after to the url successful creation of a session ?? – PRASHANT Apr 25 '17 at 18:41