Jump to content

uploading file paths


witham

Recommended Posts

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
https://forums.phpfreaks.com/topic/135494-uploading-file-paths/#findComment-706590
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
https://forums.phpfreaks.com/topic/135494-uploading-file-paths/#findComment-707885
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.