Jump to content

uploading file paths


witham

Recommended Posts

hi i am hoping someone can help me, I need to upload the path to a pdf file stored on the same machine. I have tried "file upload" but I can't seem to make it work. I will continue to try but I just need to establish if this is the correct piece of code to be using?

Link to comment
Share on other sites

Thanks for you reply I have a database that contains various information input via a form this includes name, address and suchlike.

Below is the array I want to display but I need the "compfile" to display as a hyperlink to the file.

{


// $row["fieldname" returns the content for the field in the current row

   	echo "<tr><td>" .$row["MANNAME"].  "</td>";

   	echo "<td>"   .$row["prodtype"].  "</td>";

   	echo "<td>"   .$row["proddesc"].  "</td>";

echo "<td>"   .$row["prodnar"].	"</td>";

echo "<td>"   .$row["prodequiv"]."</td>";

echo "<td><a href=>"   .$row["compfile"]."</td></tr>";



}


// close html table tag
echo "</table>\n";

 

Link to comment
Share on other sites

Just a note but don't forget to close the anchor tag or excape quote for the link

echo "<td><a href=\"".$row["compfile"]."\">Text Here</a></td></tr>";

 

for an image just replace the text with an image tag ie

echo "<td><a href=\"".$row["compfile"]."\"><img src=\"myimage.jpg\"></a></td></tr>";

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.