Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
error getting REFERER
Old 07-03-2006, 04:44 AM error getting REFERER
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
Hi All,

I am using thebelow code at TOP of my page.

Code:
       <?php
   
                 session_start();	
	 if (!isset($_SESSION['from'])) 
                {
	 
/* line 6 */	      $_SESSION['from'] = $_SERVER['HTTP_REFERER']; 
	 
	 }
but i am getting the below error :

Notice: Undefined index: HTTP_REFERER in D:\wwwroot\thefirstpost\email.php on line 6

Could any one highlight why i would be getting this error.

Cheers

Steve
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
 
Register now for full access!
Old 07-03-2006, 12:46 PM Re: error getting REFERER
Ultra Talker

Posts: 256
Location: Auckland, New Zealand
Trades: 0
Usually this is because REFERER information is blocked by browsers and firewalls (because it's prying on privacy), so there's no guarantee that this variable will be set for the server which is why it's resulting in Undefined.

So either check if it's set similar to how you've done the check for $_SESSION['from'] and if it's not then set a default for it or make it empty/undefined. Is it important that you have this information? If it's only to know that the information came from your server, then why not set variables up that you could check that validates it came from your server.

Cheers,

MC
__________________
#------------------------------signature---------------------------------------------------------------------------------#
Quote:
I am well recognised for what I don't do than what I do. Chores are just one of those things.
mastercomputers is offline
Reply With Quote
View Public Profile Visit mastercomputers's homepage!
 
Reply     « Reply to error getting REFERER
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09980 seconds with 12 queries