-1

is there a way to redirect to the same open tab in browser from a registration mail?? And work with the same session ?? I guess there must be ... because i just signed in here in stackoverflow ... and it was doing exactly that. (I think)

I am trying to do the same with php. I want the user to be able to register via the link - the easy way. But also during the order process. Which means i already have a session running with CART and Customer information to which i want to redirect of course.

Thanks.

SteAp
  • 11,853
  • 10
  • 53
  • 88
FitzPatrick
  • 175
  • 10

1 Answers1

1

If I am understanding your question correctly, you want to send an email to a user from a web page and, when the user checks their email and follows a link within it, have it open that new page in the same exact tab they originally generated the email from.

Fortunately, there isn't a way to set focus a specific tab or a window. This would be an ad providers dream, which is why it is not possible to do.

What you could do is set a cookie storing the information you wish to save about the user so when they do eventually come back, you would be able to check for the cookie and reference any information you stored about their visit in the cookie.

Michael Irigoyen
  • 22,513
  • 17
  • 89
  • 131
  • ... or simply have a session active. As long as the domain names match, the browser will continue the session when the user clicks the link in the E-Mail. – Pekka Aug 25 '13 at 22:07
  • @Pekka웃 Yes, unless the user closes the browser between checking the mail and coming back, which is a possibility. – Michael Irigoyen Aug 25 '13 at 22:13
  • okay great ... so that means if i have a session running and get to the SAME URL again from where the registration mail was sent... it should work ?? – FitzPatrick Aug 25 '13 at 23:52
  • my problem is .. when i confirm registration via mail ... and get back .. the shoppingcart is empty, where in the original tab the cart is filled with products. – FitzPatrick Aug 26 '13 at 00:00
  • @user are you sure you are on the exact same domain? (`www.domain.com` and `domain.com` are different domains) – Pekka Aug 26 '13 at 01:14