Page 1 of 1

create a link to an external undefined file on a php DB

Posted: Mon Jun 18, 2012 5:38 am
by jonnyfortis
I have a file uploader that will send pdf files to the php DB. the pdf's will be auto naming so i cant just make a standard link

the db field name is "inventory" then the pdf is stored in a folder on the server called hostadmin/docs.

i have made the following link

<a href="../hostadmin/docs/<?php echo $row_Recordset1['inventory']; ?>"><img src="../images/smalldownload.png" width="35" height="35" alt="download" /></a>


when i select the link it just sends me to http://www.student.com/beta/hostadmin/docs/

but i will need to show the pdf that has been uploaded e.g inventory1340013581.pdf


can anyone help?

thanks in advance

Re: create a link to an external undefined file on a php DB

Posted: Mon Jun 18, 2012 6:59 am
by Celauran

Code: Select all

<?php echo $row_Recordset1['inventory']; ?>
Does that code by itself produce the expected output?

Re: create a link to an external undefined file on a php DB

Posted: Mon Jun 18, 2012 8:16 am
by jonnyfortis
Celauran wrote:

Code: Select all

<?php echo $row_Recordset1['inventory']; ?>
Does that code by itself produce the expected output?
how do i test that?

Re: create a link to an external undefined file on a php DB

Posted: Mon Jun 18, 2012 8:42 am
by jonnyfortis
Celauran wrote:

Code: Select all

<?php echo $row_Recordset1['inventory']; ?>
Does that code by itself produce the expected output?
ok its working now,

<?php echo $row_Recordset1['Inventory']; ?>

seems to be linking to the pdfs correctly

thanks