Analize the results from this.
$conn=mysql_connect("localhost","","");
if (!$conn)
{
echo mysql_error();
exit
}
mysql_select_db("binary_data",$conn);
$data = addslashes(fread(fopen("$form_data", "r"), filesize("$form_data")));
echo $data;
$result="insert into binary_data(description,bin_data,filename,filesize,filetype)values('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')";
echo $result;
$res=mysql_query($result,$conn);
if (!$res)
{
echo mysql_error();
exit
}
$id= mysql_insert_id();
print "<p>This file has the following Database ID: $id";