besides of that, it only uploads files with .txt extension
perfectly... mp3's have to be about 40 KB big,
and it doesn't do pdf's completely (was a file of about 40kb)
here's the code:
<?php
require ('inc/login.inc.php');
$user = $POST['user'];
$date = $POST['date'];
$type = $POST['type'];
$comment = $POST['comment'];
$date = date("d.m.y");
$title = $FILES['userfile']['name'];
$size = $FILES['userfile']['size'];
$map = "/var/www/html/pu/datadump/files/".$_FILES['userfile']['name'];
echo "
YOU $user , wanted to upload:<BR>
title: $title<BR>
of the type: $type<BR>
with size: $size<BR>
<BR><BR><BR>
<BR><BR><BR>
to the dir:
$map<BR>
with the comment: $comment";
move_uploaded_file($_FILES['userfile']['tmp_name'], $map);
$sqlquery = "INSERT INTO ".$table." (user,date,file,size,type,comment) VALUES ('".$user."','".$date."','".$title."','".$size."','".$type."','".$comment."')";
mysql_query($sqlquery);
?>