ok so far...
but how do i get the temporary uploaded file to read?
i tried that:
$ft=$_FILES["image"]["tmp_name"];
$data = addslashes(fread(fopen($ft, "rb"), filesize($ft)));
$query="INSERT INTO images(id,pid,data,alt,desc) VALUES ('','$row[id]','$data','','')";
but:
fread(): supplied argument is not a valid stream resource