|
Posted by on 08/30/05 01:53
i can't seem to isolate the problem...but, i have my php.ini file enabling
file uploads and have the upload path set to a valid location on my
hard-drive with correct security permissions. no variables seem to be
submitting. any ideas would be appreciated...btw, here's my quick test
script (sorry for the wrapping):
<?
$pageTitle = "Upload";
require_once "inc/head.inc.php";
echo "<pre>$fileDescription</pre>";
if (isset($uploadFile))
{
$data = addslashes(fread(fopen($file_name, "r"), filesize($file_name)));
unlink($file_name);
$sql = "
INSERT INTO binaryData
(
Description ,
FileData ,
FileName ,
FileSize ,
FileType
)
VALUES
(
'$fileDescription' ,
'$fileData' ,
'$file_name' ,
'$file_size' ,
'$file_type'
)
";
$db->Execute($sql);
exit;
}
?>
<div class="pageBody">
<form method="post" enctype="multipart/form-data">
<span class="label">Description</span>
<input autocomplete="off" class="value" name="fileDescription"
type="text">
<br>
<span class="label">File To Upload</span>
<input class="value" name="fileData" type="file">
<br>
<span class="label">Create Or Update</span>
<input class="value" name="createOrUpdate" style="border-width:'0px';
text-align:'left';" type="checkbox" checked>
<br>
<br>
<br>
<input name="uploadFile" type="hidden" value="true">
<input class="value" type="submit" style="cursor:'hand';"
value="Continue >>">
</form>
</div>
<?
echo $sessionFooter;
?>
[Back to original message]
|