|
-
Nov 29th, 2006, 03:00 PM
#1
Thread Starter
Hyperactive Member
Logging in from an email
Members can view posts and I've added a 'interest' link so they can click on it and the poster can see the member is interested in their post. However what I'd like to do is send an email when a user shows interest and within that email include a link to the users interests table.
I have done sending emails with PHP before, so I think I could manage this, and I would obviously just include a link to the interest table within the email. However what I was thinking about was that if a user clicks on the link they will not be logged in - therefore my authentication will ask them to login. BUT THEN what I want to happen is that on login they should go to the interests table. In other words the system needs to somehow know where the user wants to login to and when they have logged in it can go to that page. (Hope that makes sense)
This is what I think I need to do:
1- I need to set a session var with the requestedURL...
2- Goto the login page
3- If the session exists the login page will know to redirect to that
Sounds ok to me, I think that's right
Anyway I was messing about trying to figure this out and I got to the point where I thought on every single page I'll start off by adding the pageURL to the requestedURL session. This way whenever you go to a page and you need to login the session will be set.
This is what I was going to add:
Code:
session_start();
session_register("s_requestedURL");
$s_requestedURL = "page.php";
Then I thought will that just be creating lots of sessions or will that be creating errors or something? Basically, what is the correct method I should deal with this task??? Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|