With certain inbound links, we have an id appended to the URL, like http://www.mysite.com/page1?keyword, where 'keyword' is then captured in the template.php file into a $_SESSION variable. We then want to append that variable onto all other pages that are then visited, as http://www.mysite.com/about-us?keyword.

How can I use the $fragment of the l() or url() functions to force all displayed links to have the $_SESSION variable appended to it?

Thank you for all the help. -Greg

Comments

Gman’s picture

Also, I know that I can hack the core url() function to do this, but I don't want to if there is another way.

Thanks. - Greg

----------
My Drupal/Tech Thoughts
vbDrupal Articles at Skejo.com