Newbie Question: $refpage

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
valleysoapbox
Forum Newbie
Posts: 1
Joined: Thu Jul 03, 2003 12:18 pm

Newbie Question: $refpage

Post by valleysoapbox »

I am hoping for some advice on this error:

Notice: Use of undefined constant HTTP_REFERER - assumed 'HTTP_REFERER' in C:\Users\Top Notch Hosting\valleysoapbox.com\www\phprint.php on line 46

Line 46 reads:

Code: Select all

$refpage = (phpversion() > "4.1.0") ? $_SERVERїHTTP_REFERER] : $HTTP_SERVER_VARSїHTTP_REFERER];
If you can help, I would be grateful: I will continue to peruse the message boards as I have been all morning.

Thanks
User avatar
m@ndio
Forum Regular
Posts: 163
Joined: Fri Jun 06, 2003 12:09 pm
Location: UK

Post by m@ndio »

try this:

Code: Select all

$refpage = (phpversion() > "4.1.0") ? $_SERVER["HTTP_REFERER"] : $HTTP_SERVER_VARS["HTTP_REFERER"];
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have a read of this:
Why is $foo[bar] wrong?

Mac
Post Reply