View Full Version : include
ggalan
09-17-2010, 12:03 AM
how can i make something like this happen?:
href="<?php include("file.php");?>"
bluewalrus
09-17-2010, 12:24 AM
What does file.php contain if it is an address it will link to whatever page is in that flie.php page. For example
If file.php contained
echo "http://www.google.com";
// because echo gives an out put.
than that would work.
If file.php contained
$location = "http://www.google.com";
In your other page you'd have to echo it and I'd pull it in before the href.
include("file.php");
href="<?php echo $location;?>"
ggalan
09-17-2010, 12:32 AM
thank you for responding. file.php would contain html markup and i suppose that would make it an ajax call
ggalan
09-17-2010, 12:36 AM
i suppose JS would handle that better, but wanted to see if an include would be possible as well
bluewalrus
09-17-2010, 01:03 AM
Well php can't be disable on the client side, parameters can be set that determine which html is used before the page is loaded, and if using a db you can query it.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.