ishani_v
asked on
How to determine if a link is clicked or not staying on the same page in PHP?
Hi,
I have a link on the page, say X, saying "Connect" clicking on which user is redirected to another page, say Y. If everything goes fine on page Y, the user is redirected to page X but instead of link, there is a text saying "Account Connected". But if something goes wrong on page Y, then I need to catch the error and display it on page X and let the link still remain active. How do I do this is in PHP? Since I am not an expert in PHP, I dont know how to do this and I need quick answers as I m stuck with my project.
Thanks in advance
I have a link on the page, say X, saying "Connect" clicking on which user is redirected to another page, say Y. If everything goes fine on page Y, the user is redirected to page X but instead of link, there is a text saying "Account Connected". But if something goes wrong on page Y, then I need to catch the error and display it on page X and let the link still remain active. How do I do this is in PHP? Since I am not an expert in PHP, I dont know how to do this and I need quick answers as I m stuck with my project.
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And one more thing...make the Third code: line 1
if ($test == 'OK') {
It needs to have 2 equal signs, not one...
(Still too early in the morning for me...sorry about that)
if ($test == 'OK') {
It needs to have 2 equal signs, not one...
(Still too early in the morning for me...sorry about that)
Third code, line 2 needs to be:
Open in new window