Store and redirect to "Last" referral link
Posted: Mon Jul 22, 2013 6:14 am
Hello Everyone,
I need help in storing the "Last/previous" referral link that user navigated from. The reason is because I need user to login before viewing the enquiry page. So most of the case if user is not logged in / guest, they will be redirected to Login page first and once they logged in, we will redirect them back to enquiry page (based on referral link). In general, these processes are all working properly only when user is successfully login with correct username and password in the "First time" BUT not when the user entered the Incorrect username and password (as the referral link updates and become as the login link because pointing back to login form). So may I know how do we store the referral link as in static variable value and will not change even if user is entering the incorrect username and password and being redirected back to the login form? I tried session, but it seems like not working (referral link still updates) or maybe I'm doing it wrongly. Please advice how do we achieve this solution.
The process as follow,
> Product page (once click on enquire button)
> Enquiry Page check if logged in, if yes > Show Enquiry Page, if no > go to Login page
> If login successful, go to > Enquiry Page, if failed stay in Login Page
For example:
1. Referral link is:
http://www.domaintest.com/products/antova123
2. Enquiry Page is: (Check if logged in, if yes show page, if no go to login page)
http://www.domaintest.com/enquiry
3. Login Page is: (The code should be in this page) - If failed, back to this page. If passed, go to Enquiry page based on referral link.
http://www.domaintest.com/login
Thanks alot,
Regards,
Josh
I need help in storing the "Last/previous" referral link that user navigated from. The reason is because I need user to login before viewing the enquiry page. So most of the case if user is not logged in / guest, they will be redirected to Login page first and once they logged in, we will redirect them back to enquiry page (based on referral link). In general, these processes are all working properly only when user is successfully login with correct username and password in the "First time" BUT not when the user entered the Incorrect username and password (as the referral link updates and become as the login link because pointing back to login form). So may I know how do we store the referral link as in static variable value and will not change even if user is entering the incorrect username and password and being redirected back to the login form? I tried session, but it seems like not working (referral link still updates) or maybe I'm doing it wrongly. Please advice how do we achieve this solution.
The process as follow,
> Product page (once click on enquire button)
> Enquiry Page check if logged in, if yes > Show Enquiry Page, if no > go to Login page
> If login successful, go to > Enquiry Page, if failed stay in Login Page
For example:
1. Referral link is:
http://www.domaintest.com/products/antova123
2. Enquiry Page is: (Check if logged in, if yes show page, if no go to login page)
http://www.domaintest.com/enquiry
3. Login Page is: (The code should be in this page) - If failed, back to this page. If passed, go to Enquiry page based on referral link.
http://www.domaintest.com/login
Thanks alot,
Regards,
Josh