Forum Moderators: coopster

Message Too Old, No Replies

PHP to Pass variable to next page

I am trying to track visitors locations and pass that info on to a 2nd page

         

Kelowna

10:23 pm on Aug 15, 2019 (gmt 0)

10+ Year Member Top Contributors Of The Month



I am trying to track visitors locations and pass that info on to a 2nd page but do not have php knowledge to do so. I feel this is really simple for those in the know.

Say I have a visitor to my "Los Angeles" page, and they click over to apply page that has the following link...

<iframe src="https://website.com/app/iframe?aff_id=5&aff_utm_source=MY_CODE_HERE&product_names=product1,&bgcolor=%23ef4541" frameborder="0" scrolling="no"></iframe>

I would like to have this iframe link change to show the city location to change
"&aff_utm_source=MY_CODE_HERE" to show "&aff_utm_source=Los_Angeles_CA"

1- what code do I need to place on say the "Los Angeles" page?
2- what code do I need to insert the "city name" into the "&aff_utm_source=MY_CODE_HERE" part of the url.

Any help would be much appreciated, I am new to php so would need sample (cut & paste) type of answers, thanks.

Dimitri

11:04 pm on Aug 16, 2019 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



The easier is to store the location in a cookie, then each of your PHP scripts can read this cookie and do whatever you want from this information.

Dimitri

1:40 pm on Aug 17, 2019 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



or you can use PHP Sessions to store it : [php.net...]

Kelowna

2:39 pm on Aug 17, 2019 (gmt 0)

10+ Year Member Top Contributors Of The Month



I know what was needed to do it, but I did not know how to code it to work.

Anyways I did find someone to get this done so we can close this thread.

Dimitri

1:17 pm on Aug 18, 2019 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



Good for you. May be you can post the code, so it can help someone else ?