I am bulding a site where users can click on links to download information about our software. When they click on a link it takes them to a page where they enter contact infor, press submit, and get the file, all using php.
When you click through it prints the filename you are downloading using php. There are a variety of file types - pps, pdf and html. My boss would like the pdf icon to appear when you download a pdf.
at the minute where this appears I have the following code:
<?php echo $file ?>
<?php if (preg_match('/.pdf$/i', $file)) {show_source ("http://www.codestone.net/gfx/adobePDF.gif");} ?>
this is working in as much as when it is a pdf file, the image's path is printed, but I do not know what command to use to make it actually show the image instead of showing it's path.
What should I write instead of 'PRINT' to show the image?
thanks for any tips x