Apache65
Technical User
- Jan 30, 2006
- 16
I have a database that contains various information in it including a path/filename of an image. I have a cgi script that connects to the database and pulls in the data into a table of a template webpage. When the page is displayed, I get the info from the database as expected, however, what I really want to happen with the image is have it displayed – what I get is the path/filename. Is there a way to create an <img> tag that can be used with a variable that will display the image not the path?
The code for the template page is below…any help would be appreciated!
<TH align="center"><font color="#FFFFFF" face="Arial">Person ID</font></TH>
<TH align="center"><font color="#FFFFFF" face="Arial">Person Code</font></TH>
<TH align="center"><font color="#FFFFFF" face="Arial">First Name</font></TH>
<TH align="center"><font color="#FFFFFF" face="Arial">Last Name</font></TH>
<TH align="center"><font color="#FFFFFF" face="Arial">File Location</font></TH>
</TR>
<TMPL_LOOP NAME="ROWS">
<TR class="<tmpl_var class>">
<TD><b><font color="#000066"><TMPL_VAR NAME="PERSON_ID"></font></b></TD>
<TD><b><font color="#000066"><TMPL_VAR NAME="PERSON_CODE"></font></b></TD>
<TD><b><font color="#000066"><TMPL_VAR NAME="PERSON_First_Name"></font></b></TD>
<TD><b><font color="#000066"><TMPL_VAR NAME="PERSON_Last_Name"></font></b></TD>
<TD><b><font color="#000066"><TMPL_VAR NAME="Photograph_File_Name_Path"></font></b></TD>
</TR>
</TMPL_LOOP>
</TABLE></td>
</tr>
</table>
</CENTER></BODY></HTML>
The code for the template page is below…any help would be appreciated!
<TH align="center"><font color="#FFFFFF" face="Arial">Person ID</font></TH>
<TH align="center"><font color="#FFFFFF" face="Arial">Person Code</font></TH>
<TH align="center"><font color="#FFFFFF" face="Arial">First Name</font></TH>
<TH align="center"><font color="#FFFFFF" face="Arial">Last Name</font></TH>
<TH align="center"><font color="#FFFFFF" face="Arial">File Location</font></TH>
</TR>
<TMPL_LOOP NAME="ROWS">
<TR class="<tmpl_var class>">
<TD><b><font color="#000066"><TMPL_VAR NAME="PERSON_ID"></font></b></TD>
<TD><b><font color="#000066"><TMPL_VAR NAME="PERSON_CODE"></font></b></TD>
<TD><b><font color="#000066"><TMPL_VAR NAME="PERSON_First_Name"></font></b></TD>
<TD><b><font color="#000066"><TMPL_VAR NAME="PERSON_Last_Name"></font></b></TD>
<TD><b><font color="#000066"><TMPL_VAR NAME="Photograph_File_Name_Path"></font></b></TD>
</TR>
</TMPL_LOOP>
</TABLE></td>
</tr>
</table>
</CENTER></BODY></HTML>