while I have no desire to code this, there are some issues with the code.
the code logic seems wrong to me. I assume you have all the records returned in the $result array. you start out with a FOR loop that builds two tables. FOR EACH RECORD. probably not what you want to do. The description (Latest files and Messages) and column headings should come before the FOR loop.
As for the FOR loop the psuedo code would be something like:
Code:
IF record_count>0
FOR loop to display File, Date, Messages (is there more than one message?)
ELSE
Display Message 'No Records Found'
END IF
CLOSE TABLE
I noted a couple of errors in the code.
$test .= '<table width="100%%" border="0">
should be
$test .= '<table width="100%" border="0">
you start out using single quotes
$test .= '<table width="100%%" border="0">
but then you use unescaped single quotes later on.
<td valign="top">[ <a href="'.$file.'">Download File</a> ]</td>
etc
Looks like that would cause an error to me.
actually you should probably do this in SMARTY. That is what it was designed to do. see the HTML pages for an example. I think there are some there.
I don't know SMARTY and have no desire to learn it at this time.
.
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.