Skip to main content
Participating Frequently
May 5, 2008
Question

Link for Dynamic Field to Open PDF or Word?

  • May 5, 2008
  • 3 replies
  • 348 views
Hello,

(MySQL/PHP)

I have a MySQL table called projects. In the projects table is a field called [uploadedfile]. This field contains the name of a document the users previously uploaded to a folder on the server. I have a Detail page has a table that displays the project data including the [uploadedfile] field. Is there a way to make a link to the [uploadedfile] field, so the user will click on the link, and the document will open? Here is the code:

<td valign="top"><?php echo $row_DetailRS1['uploadedfile']; ?></td>

Thanks for your help
This topic has been closed for replies.

3 replies

Inspiring
May 6, 2008
The first one is the link, and the second one is what is seen on the page.

--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"WPW07" <webforumsuser@macromedia.com> wrote in message news:fvnm31$6o7$1@forums.macromedia.com...
> Thanks Ken. Out of curiosity, how does this work? Why the same code twice?
>
>
WPW07Author
Participating Frequently
May 5, 2008
Thanks Ken. Out of curiosity, how does this work? Why the same code twice?

Inspiring
May 5, 2008
<td valign="top">
<a href="<?php echo $row_DetailRS1['uploadedfile']; ?>"><?php echo $row_DetailRS1['uploadedfile']; ?></a>
</td>

--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"WPW07" <webforumsuser@macromedia.com> wrote in message news:fvnh62$1mo$1@forums.macromedia.com...
> Hello,
>
> (MySQL/PHP)
>
> I have a MySQL table called projects. In the projects table is a field called
> [uploadedfile]. This field contains the name of a document the users
> previously uploaded to a folder on the server. I have a Detail page has a
> table that displays the project data including the [uploadedfile] field. Is
> there a way to make a link to the [uploadedfile] field, so the user will click
> on the link, and the document will open? Here is the code:
>
> <td valign="top"><?php echo $row_DetailRS1['uploadedfile']; ?></td>
>
> Thanks for your help
>