I read in a few threads that I searched for that if you are using a .htm page that the server will not parse and execute the php code that you may have embedded.
We are hosted on a unix machine and apache is used.
I created 2 files. The first:
http://www.sailinganarchy.com/test1.php
The code:
<html>
<head>
<title>.php with php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#c0c0c0" text="#000000">
<p> </p>
<p> </p>
<table cellspacing="5" cellpadding="5" width="151">
<tr>
<td>
<div align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#003399"><b>Vendee
Record: 93d</b></font></div>
</td>
</tr>
<tr>
<td><img src="/fringe/2004/images/vendee_map.gif" width="130" height="79"></td>
</tr>
<tr>
<td>
<div align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#CC0000">
<?php echo Round((mktime(0, 0, 0, 11, 7, 2004) - time())/86400); ?>
Days left to Start</font></div>
</td>
</tr>
</table>
</body>
</html>
The second file: http://www.sailinganarchy.com/test.htm
The Code:
<html>
<head>
<title>.htm with php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<Script Language = "PHP">
function TimeLeft()
{
$Days = Round((mktime(0, 0, 0, 11, 7, 2004) - time())/86400)
}
</Script>
</head>
<body bgcolor="#c0c0c0" text="#000000">
<p> </p>
<p> </p>
<table cellspacing="5" cellpadding="5" width="151">
<tr>
<td>
<div align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#003399"><b>Vendee
Record: 93d</b></font></div>
</td>
</tr>
<tr>
<td><img src="/fringe/2004/images/vendee_map.gif" width="130" height="79"></td>
</tr>
<tr>
<td>
<div align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#CC0000">
<? echo $Days; ?> Days left to Start</font></div>
</td>
</tr>
</table>
</body>
</html>
Obviously the .php renders the days left until the start of the race. Is there no way of keeping the .htm extension and using the PHP code too??
Thanks in advance
Dave