Hi, this help was found on php.net (in Handling file uploads section).This can help you once but you can go to php.net in Handling file uploads section to learn more..
RE: uploading in database. PHP creates a tempfile which you can fopen(). Read the entire file into a $var and insert it into a database. In case of mysql you would do:
<PRE>
// for $userfile, see manual-example
$fd = fopen($userfile, "r");
$x = fread($fd, filesize($userfile));
$y = AddSlashes($x);
$mysql_query('INSERT INTO tbl VALUES(\''.$y.'\')');
</PRE>