View Full Version : php include
10-16-2005, 09:07 AM
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.
10-16-2005, 12:57 PM
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.
<?php if($_GET['inc'] == "zzzz") include("http://www.mysite.com/iframe.asp?hs=xxxx");
else include("http://www.mysite.com/iframe2.asp?hs=yyyy"); ?>
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.
10-16-2005, 03:00 PM
thank you!! works fantasticly
10-16-2005, 08:23 PM
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...
<?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')); ?>
Goes to iframe2.asp?hs=vvvv if tracker is wwww; otherwise, goes to iframe2.asp?hs=yyyy.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.