PDA

View Full Version : Need Help Using Query Strings To Swap Code On A Page



yourwebgurus
26 Feb 2011, 09:38 AM
Hi all -

I am trying to setup a page so that where some type of query variable is added to the URL, one specific peice of code on that page automatically swaps out.

Specifically, I am trying to make a slight adjustment to an external link on the page, adding an SID code for an affiliate campaign, based on the query variable in the url.

So url in the browser for my page might be: http://www.mysite.com/mypage.html?sid=whatever for example, thus making the code on the page

http://www.externallink.com/?sid=(query variable)

or in this case

http://www.externallink.com/?sid=whatever

The code I am trying to change is "whatever" based on whatever is after sid= in the destination url reference.

Looking for hopefully a simple solution for this! Your help is GREATLY appreciated! :nana: