How to put the previous page url as a variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben

    How to put the previous page url as a variable

    Hi,
    Is it possible for php to set a variable to have the same value as
    the url of the previous page? I want to do this without having to
    post the information, use sessions or cookies. Can this be done?

    Thanks


    Ben
  • Andy Hassall

    #2
    Re: How to put the previous page url as a variable

    On 21 Feb 2005 15:20:21 -0800, bs2k1@excite.co m (Ben) wrote:
    [color=blue]
    > Is it possible for php to set a variable to have the same value as
    >the url of the previous page? I want to do this without having to
    >post the information, use sessions or cookies. Can this be done?[/color]

    No, not reliably, if you're excluding adding to the query part of the URL,
    posting, sessions or cookies. Look at $_SERVER['HTTP_REFERER'] for an
    unreliable method based on trusting the client.

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    Working...