how can i make something like this happen?:
Code:href="<?php include("file.php");?>"
how can i make something like this happen?:
Code:href="<?php include("file.php");?>"
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
than that would work.PHP Code:echo "http://www.google.com";
// because echo gives an out put.
If file.php contained
PHP Code:$location = "http://www.google.com";
In your other page you'd have to echo it and I'd pull it in before the href.
PHP Code:include("file.php");
href="<?php echo $location;?>"
Corrections to my coding/thoughts welcome.
thank you for responding. file.php would contain html markup and i suppose that would make it an ajax call
i suppose JS would handle that better, but wanted to see if an include would be possible as well
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.
Corrections to my coding/thoughts welcome.
Bookmarks