I making the file encode LIVE, so it doesn't have to go to a DIR and make it go straight to my mysql database. Can anyone debug/solve this....i'm having a hard time. :blink: :blink: THANK YOU THANK YOU Ummmm if you have another suggestion i wanna here it as long as it stores in mysql data base..
$haha = $_FILES["userfiles"]["name"];
$filename = "$haha";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
$encoded = chunk_split(base64_encode($handle));
$sql = "INSERT INTO images SET sixfourdata='$encoded'";
@mysql_query($sql);
?>
Warning: fread(): supplied argument is not a valid stream resource in /home/chaotici/public_html/community/validateFile.php on line 12
Warning: fclose(): supplied argument is not a valid stream resource in /home/chaotici/public_html/community/validateFile.php on line 13