Hi,
I want to change the php include when someone clicks on a link on the page. Does anyone know if this is possible?
Hi,
I want to change the php include when someone clicks on a link on the page. Does anyone know if this is possible?
Of course it is. Make the link pass a GET variable, then check for that variable when you call the include.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Hi Twey, Thanks for your help once again!!
How would i go about doing this?
So for, all I have is:
<?php include("http://www.mysite.com/iframe.asp?hs=xxxx"); ?>
What would i have to do to the link to change the url in that php include??
Say the page that includes that is called page.php.
Then, if the page was accessed as page.php?inc=zzzz it would include iframe.asp?hs=xxxx; otherwise, it would include iframe2.asp?hs=yyyy.PHP Code:<?php if($_GET['inc'] == "zzzz") include("http://www.mysite.com/iframe.asp?hs=xxxx");
else include("http://www.mysite.com/iframe2.asp?hs=yyyy"); ?>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
thank you!! works fantasticly
OK, so now what i've done is:
On the page handset.php, the value of the parametre "network" changes the "php include". Could you add another parametre called "tracking" to change another part of the url in the "php include" ??
But i want the tracking parametre to work whatever the network parametre is...
Goes to iframe2.asp?hs=vvvv if tracker is wwww; otherwise, goes to iframe2.asp?hs=yyyy.PHP Code:<?php if($_GET['network'] == "zzzz") include("http://www.mysite.com/iframe.asp?hs=xxxx");
else include("http://www.mysite.com/iframe2.asp?hs=" . ($_GET['tracker'] == 'wwww' ? 'vvvv' : 'yyyy')); ?>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks