[thelist] When to use SSI for your website

Katherine Spice k.spice at acu.ac.uk
Tue Sep 4 04:45:39 CDT 2001


Hi Shirley,

> I typically use it for site navigation, top mast, bottom footer and 
> copyright information.... anything that is repetitive like this.

This is *exactly* the kind of thing SSIs are good for. The only thing I would add (as a programmer rather than a designer) is that you can also include programs - for example where the values in a
select box come from a database - rather than make the entire page a cgi, include a program which prints the output. Eg,

<select>
<!--#include virtual="/cgi-bin/displaylocations.pl"-->
</select>

where displaylocations.pl is

$sql_query = "SELECT X,Y FROM TableZ;";
$query_handle = $dbh->prepare($sql_query);
$query_handle->execute;
       
print "Content-Type: text/html";

while (($key,$value) = $query_handle->fetchrow_array) {
	print "<option value=$key>$value</option>\n";
}

Cheers,
Katherine




More information about the thelist mailing list