Code:
print $in->header(text/php); #which is where the problem begins...<?php/* Php code goes in here */?>
Because PHP is _server_side_ and depends on the file extension, not the content header, and the content header is what the browser needs to know what to do with it, the type should still be "text/HTML" shouldn't it?
Servers decide what to do with a file based on it's extension (MIME-type) or location (scriptalias directory). The browser decides what to do with a file based on the content header sent by the server based on the MIME-type determined by the extension.
By the time the file hits the browser, there is no "php" code in it, it's all been replaced.
So, what the Links scripts need to do is write out the templates as .php files, not .html files. (just like you'd write out .shtml for SSI).
Wherever you wanted PHP to do some work, you'd have to put the tags in, just as you would Javascript or SSI. Then, you'd have _TWO_ sets of replacement tags. One set that Links would replace when it generated the "static" site, and the second set that is the PHP that is used when the "static" site is accessed.
To get Links and PHP to work together should not be hard -- PHP is just a scripting language that does something where you tell it in the "HTML" file that is sent back to the browser.
For instance, if you wanted your home page to insert the last 10 accessed links in your site, you could make it a .php3 file, have links write out an index.php3 file, and use a snippet of PHP code that accesses the database, and asks for the 10 files with the most recent time stamp, then displays them.
Think of it as SSI on steroids (at least at first) then you can expand it into programs the same way people got Lotus 123 to do everything except add up numbers
------------------
POSTCARDS.COM -- Everything Postcards on the Internet
www.postcards.com LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/