Reply to file upload problem

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация