How to write a PHP coding which automatically redirects the user to a...

Hasra

New member
...different page if he hasn’t log-in yet.? How to write a PHP coding which automatically redirects the user to a different page if he hasn’t log-in yet.

For an example, suppose USER is currently in home.html and clicks the link to resources.html. Before system send the USER there, system should check whether the USER has logged-in to the system. If he is so, then send the USER to resources.html OTHERWISE REDIRECTS page to loggin.html

What is/are the PHP functions that we can use to redirects the user to a different page based on particular condition? Do we can make use of cookies to manage sessions and check the current status of the user?

Please give me some example coding and any references as well (such as free e-books.)

I have another problem regarding usage of SSL in Apache. I have installed Apache 2.2 with SSL in my machine. I want to know how to create secure page (which display https://..... In address bar) for a log-in page. (I have Apache 2.2 with SSL and PHP 5.2)

Please give some references to this as well.

Thank you.
 
Back
Top