SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Thread: $_SERVER['HTTP_REFERER'] problem
-
Nov 19, 2008, 22:52 #1
$_SERVER['HTTP_REFERER'] problem
Hi,
I am having problem with $_SERVER['HTTP_REFERER'] i put this in my PHP coding however it is giving me the error in IE6.0 however in Firefox it is working perfectly. I see with print_r($_SERVER) in FF it is showing HTTP_REFERER in the array however is NOT showing in the IE6.0.
It seems that it is browser specific. Is there any alternative to $_SERVER['HTTP_REFERER'] which works in All the browsers or in anyway i can make $_SERVER['HTTP_REFERER'] work in all the browsers.
Thanks !!
-
Nov 19, 2008, 23:09 #2
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
PHP runs on the server - which browser is being used makes no difference to the code working or not.
Where the browser can make a difference regarding the HTTP_REFERER value is that it can be disabled in the browser so that it doesn't get sent.Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Nov 19, 2008, 23:21 #3
-
Nov 19, 2008, 23:48 #4
- Join Date
- Jul 2008
- Posts
- 5,757
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It's usually enabled by default, although different browsers have different scenarios of when they won't send it even when enabled.
What specifically do you think you need this for? Be detailed and we can provide a solution.
-
Nov 20, 2008, 00:04 #5
Well, i would like to see from where the user is coming to my website. What i am doing is, i am sending an link such as <a href="#" onclick="myfuntion()">MY TEXT</a> When a user clicks on this link that javascript function will redirect that user to my webpage. I would like to know from which page the user is coming from ?
I hope i make myself clear.
Thanks !!
-
Nov 20, 2008, 00:15 #6
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
It is entirely up to your individual visitors whether they turn on the privacy setting in their browser that removes the value from that field (or use the tools in their browser to change the value to whatever they decide it should be).
If you want to know which other page on your site they were on then you can pass that yourself in the querystring on the end of the link and read it from there.Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Nov 20, 2008, 00:26 #7
Bookmarks