Hello,
This code is integrated for file-upload:
if ($action == "upload")
{
if (isset($binFile) && $binFile != "none")
{
$data = addslashes(fread(fopen($binFile, "rb"), filesize($binFile)));
$strDescription = addslashes(nl2br($txtDescription));
$sql = "INSERT INTO tbl_Files ";
$sql .= "(description, bin_data, filename, filesize, filetype, owner, prop_num) ";
$sql .= "VALUES ('$strDescription', '$data', ";
$sql .= "'$binFile_name', '$binFile_size', '$binFile_type', '$current_user', '$propnum')";
if (!mysql_query ($sql, $link) )
{
die (mysql_error());
}
All data is being recorded to the database except for the 'bin_data' (=longblob). Does anyone know what might be the trouble? I'm puzzled...
Greetz Jaap