Php Login W/ Sessions/redirect
I have created a website that I’m having troubles getting to work correctly. I have created a login script that works without troubles, but I can’t seem to get the redirect to work. I prefer not to use cookie or javascript, just want to use PHP sessions.
Scope of work is below with example.
The user will get a link within the email that corresponds to a project. When the user clicks the link, I want to see if the user is logged in, if yes, direct them to the page. If not, redirect them to the login page, when completed with the login page, redirect them back to the corresponding project link.
In example, the user is emailed the link http://intranet/hd/view_project.php?id=8, when the user clicks the link the system checks to see if the user has a valid session id, if not it redirects him to the login page. After he completes the login page, he is then redirected to the above link. If he already has a valid session id, he is just simply directed to the above link.
You can modify my code or change to something you have experience with, I don’t care, but it’s got to work. I have attached all the files that will be needed to complete the project. I’m currently developing this website using php 5.2.1 and using mysql 5.0.22 on a windows based machine.
Must be able to communicate via email in timely manner.


