SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot mpdesigns's Avatar
    Join Date
    Apr 2004
    Location
    Wisconsin
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Grab Address Bar data with PHP?

    Is it at all possible to grab or pull address bar information to compare to database records? Like for example, I would like to compare a database record field to data in the address bar. visual example:

    IF addressbar information = database addressbar field
    THEN display pertaining records and data.

    Hopefully someone can help this frustrated soul.
    Keep it Symple!

  2. #2
    Non-Member
    Join Date
    Oct 2004
    Location
    Net
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ntiko.

  3. #3
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $url "http://" $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; 

  4. #4
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Yup, REQUEST_URI will give you your query string included but if that's not what you're after then maybe PHP_SELF or SCRIPT_NAME will work better

  5. #5
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cam
    Yup, REQUEST_URI will give you your query string included but if that's not what you're after then maybe PHP_SELF or SCRIPT_NAME will work better
    It all depens on what he/she needs, query string and PATH_INFO can mean a lot for statistics.

  6. #6
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Oh yeah I know, just thought I'd point alternatives out to save more posting and waiting You know you're always right Mike


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •