View Single Post
  #5  
Old 12-02-2004, 08:09 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,965

in your mysql query direct from $_POST use:,

Code:
mysql_query("INSERT INTO blah VALUES(NULL,LOAD_FILE('$_FILES['file']['tmp_name']'),'$value2')");
If you uploaded the file first, do a:
Code:
move_uploaded_file(soruce,destination.filename);
then
Code:
chmod(destination.filename,octdec("0777"));
then
Code:
mysql_query("INSERT INTO blah VALUES(NULL,LOAD_FILE('destination.filename'),'$value2')");
then
Code:
chmod(destination.filename,octdec("0644"));
To make it normal again.. As far as I know only 1 file per BLOB.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote