Hi rusdvl,
I believe you are trying to achieve something like a step by step
process where you don't want to a user to skip to step n directly but,
instead be from step (n-1). There are quite few ways to achieve
something similar to what you want although, the underlying principal
remains the same i.e. you need a way to keep track of the last visited
page.
You can use HTTP_REFERER but, as Nathan suggested it cannot be
considered as a solid solution due the nature of the technologies
controlling the content e.g. a firewall or web-server settings.
If you are in control of all the resources/pages in the web-
application then, this is what you can do-
1. Assign each page an ID (Does not always have to be a number)
2. This ID can be stored in a cookie(encrypt to be more secure),
session, GET variable, POST to another page etc.
    Depends on your requirements.
3. On the page, where you want to put a check, find out if any of the
variables' mentioned above contain the expected ID, if not, redirect
otherwise, continue.

Let me know, if this works out for you.

Regards,
Mark S.

On Dec 4, 11:25 am, rusdvl <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> How do I redirect a person to a different page if they didnt come from
> a particular page?
>
> I know I use the header(); function but not sure what to place in the
> if()
>
> So it would be:
>
> if(something something)
>     {
>           header('Location: index.php');
>     }
>
> Thanks ahead for the help.
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to