I'm trying to create a script that will show the entries in a database (which works fine), but will also retrieve a Word Document that has been uploaded to the database.
Trying to retrieve it as the href file that I've been trying is not working. Any suggestions as to how I can do this?
<?
$connection=mysql_connect("localhost", "user", "password")or die ("Connection Couldn't Be Established");
$db=mysql_select_db("name", $connection) or die ("Database Not Available For Selection");
$query ="SELECT product_name, manufacturer, supplier, common_name, dolu, notes, linked FROM msds";
$result = mysql_db_query("name", $query);
if ($result) {
echo "Found these entries in the database:<ul>";
while ($r = mysql_fetch_array($result)) {
$product_name = $r["product_name"];
$manufacturer = $r["manufacturer"];
$supplier = $r["supplier"];
$common_name = $r["common_name"];
$dolu = $r["dolu"];
$notes = $r["notes"];
$linked = $r["linked"];
echo "<li><P><B>Product Name</B> - $product_name<BR><B>Manufacturer</B> - $manufacturer<BR><B>Supplier</B> - $supplier<BR><B>Common Name</B> - $common_name<BR><B>Date Last Modified </B> - $dolu<BR><B>Notes</B> - $notes<BR><B>MSDS Data</B> - <A HREF="showfile.php3">View MSDS Sheet </A>";
}
echo "</ul>";
} else {
echo "No data.";
}
?>
Thanks in advance.
Michelle Tarby