Use this as a base. The include statement only reads the data back out of the DB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>Untitled</title>
</head>
<body>
<body background="marble0H.gif">
<?
$dbh=dbmopen( "/inetpub/wwwroot/db/files","c") or die ("Cant do 2");
$file_dir="c:\inetpub\wwwroot\docs";
$file_url="http://192.168.1.138\docs";
if (isset( $fupload ) )
{
$x=strlen($fupload_name);
$uplen=($x-4);
$fn=substr($fupload_name,0,$uplen);
dbminsert($dbh,$fn,"");
copy ( $fupload, "$file_dir/$fupload_name") or die ("Could not copy");
}
dbmclose($dbh);
?>
<p><h1>Upload Form</h1></p><p></p>
<form enctype="multipart/form-data" action="<? print $PHP_SELF ?>"
method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="2048000">
<input type="file" name="fupload"><br>
<input type="submit" value="Send File">
</form>
<table border=2 cellpadding="5">
<tr>
<td>File</td>
</tr>
<?include("dbread.php");?>
<tr><td></td><tr/>
</table>
</body>
DB READ
<?
$dbh=dbmopen( "/inetpub/wwwroot/db/files","c") or die ("Cant do 2");
$key=dbmfirstkey($dbh);
$loc="http://192.168.1.138/docs";
while($key !="")
{
$value=dbmfetch($dbh,$key);
print "<tr><td><a href=\"$loc//$key.doc\">$key</a></td>";
$key=dbmnextkey($dbh,$key);
}
dbmclose($dbh);
?>
Hope this helps.
Neil