Posted on: 12/10/04 12:14am
By: frisco3
First off, I don't know the first thing about php code. With that said, I've put together a rather nice site at
acttour.com[*1] for car racing in Vermont.
My question is: What exact code do I need to add a simple link at the bottom of a php block? I've tried to add the html tag in the lib-custom function and it produces an error so none of my page appears. Can someone help or do I need to go to php school?
add link within php block?
Posted on: 12/11/04 01:43pm
By: Dirk
The PHP block function should have some string variable that it returns, say,
return $retval;
You will have to add your link to that string (before the
return
statement). Something like
$retval .= '<a href="http://example.com">click here</a>';
bye, Dirk
add link within php block?
Posted on: 12/11/04 04:47pm
By: frisco3
Thanks Dirk. I found another workaround by making the block a normal block and inserting the php command to call the function inside the block. For anyone interested, here's the code I used...
<html>
<?php
require_once( '/mywebsiteinfo/geeklog/system/lib-custom.php' );
echo phpblock_galleryRandomPhoto();
?>
<br><center><a href="http://www.acttour.com/gallery/albums.php">Photos Home</a></center>
</html>