roundcorners Posted February 22, 2009 Share Posted February 22, 2009 Hello, please can someone advise how I could swap the include loaded into an index page when a link in the existing include is clicked? Link to comment Share on other sites More sharing options...
ckrudelux Posted February 22, 2009 Share Posted February 22, 2009 Hello, please can someone advise how I could swap the include loaded into an index page when a link in the existing include is clicked? <?phpif(isset($_GET['what_ever_you_want_to_call_it'])) // if you have a GET what_ever_you_want_to_call_it loaded do this{ $what_ever_you_want_to_call_it = $_GET['what_ever_you_want_to_call_it'] . ".php"; //$what_ever_you_want_to_call_it = (what_ever_you_want_to_call_it = filename).php include "$what_ever_you_want_to_call_it";}?> This is the code for the include. <a href="index.php?what_ever_you_want_to_call_it=filename">Change include file</a> here is the link code.Really bad in explaning but I hope you figure it out... ask if you don't understand. Link to comment Share on other sites More sharing options...
roundcorners Posted February 23, 2009 Author Share Posted February 23, 2009 Thank you very much, in the end I used;<a href="index.php?var=true">Page with new include</a><?php if($var == "true") include("newInclude.php");?>Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.