When a visitor comes to my site and fills out a form, I would like to catch the search engine search terms that visitor used to find my site.
This must be possible because webtrends can get this sort of information.
How could I do that?
Jon
You can use $_SERVER['HTTP_REFERER'] to get the referring url and then parse that url to determine the keywords. please look at
http://www.phpbuilder.com/board/showthread.php?s=&threadid=10211852&highlight=httpreferer
Doesn't work with all user agents, though:
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server
HTH
Toby