Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
HTTP_REFERER nothing there?

Posted by Chris_Isaac (Chris Isaac), 14 May 2006
I'm trying to use the above predefined varible, but it's not there??

I've looked in the phpinfo() page, but its not listed, does it exist anymore?

I can get SERVER_NAME, and others like that, but not HTTP_REFERER.

What I'm trying to do is look at the referer page and if its from page X then it will display X's title, if it from page Y then it will display Y's title, is there another way of doing it apart from HTTP_REFERER?


Posted by admin (Graham Ellis), 14 May 2006
No, not gone away for good ... but I think I know what may have happened to you.  The  $_SERVER[HTTP_REFERER] variable is only set if there is a referer in the http headers - i.e. if the page is called up via a link.  If you go to your phpinfo page by typing in its URL, you won't see it.

By the way - you might do better to have each page pass on its referer reference via a hidden field rather than by using the referer, as it's quite easy on some browsers to tell them NOT to sent the referer.   Users of such browsers will find your site broken as far at they're concerned if you rely on the referer.

Posted by Chris_Isaac (Chris Isaac), 14 May 2006
It was called via a form submit button (the form I was having trouble with on the last problem I had).  The form originated from 1 domain then went to another so I assumed it would show in HTTP_REFERER.

I'll try adding it as a hidden field.

Thanks again.

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho