works great. I use it on a few sites. time.egn has a simple mtime() function and
database.egn are just my sql wrappers.
<?php
include_once('database.egn');
include_once('time.egn');
if ($db_file != 'none' AND $db_file AND is_uploaded_file($db_file) AND
filesize($db_file))
{
$db_file = addslashes(fread(fopen($db_file, 'r'), filesize($db_file)));
$db_file_id = mtime();
insert_db_value('images', " '$db_file_id', '$db_file', '$db_file_name',
'$db_file_type' ");
}
echo "
<html>
<body>
<form method=post enctype='multipart/form-data' action='$PHP_SELF'>
<input type=file name=db_file>
<input type=submit>
</form>
</body>
</html>
";
?>
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
[EMAIL PROTECTED]
"Daniele" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
A friend ask me how to insert image and other binary in his mysql db.
He don't want to insert the link to the file, he want insert the file itself..
I looking for some tutorial but i don't find anything...
I would like to know how i can do it in php and with the shell of
mysql...and if this works fine.
thanks!!
daniele
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]