SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: http_referer

Hybrid View

  1. #1
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would you print refering URL in PHP?

    echo $HTTP_REFERER ???

    Also,

    IN a table i have a field called aid.

    One URL is http://www.mysite.com/articles.php?aid=a_number

    One problem is that, say i type in the number 1, i get the article related to number 1 however if i type in the number, let's say...94...It displays a page, when this record does not exist.

    How can i overcome this?

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    error checking display something if the record doesn't exist like

    "Sorry Dude, that record doesn't exist."
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it displays a page, but what page?
    That page could and should be cutomized error page.
    Just need to put a check before printing out anything, pretty simple to do.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  4. #4
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would i do that? Also to make sure that if a link, links to it, that it is displayed the same message?


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
  •