ok im in the process of creatng an user based upload system.
i need a way to check to see if the file a user is uploading takes their total storage limit over their alloted space:
i thoght something like:
$upfileize = uploading file siez here;
$totalused = "$currenttotal + $upfilesize";
if($totalused > $userallowed)
{
echo "Sorry You Do Not Have Sufficient Storage Space For This File";
}
else
{
Continue uploading file
}
so i have a table called mfs_usertype
within this table it contains deetails for different user levels including the max storage capacity.
i will assign the reults of the query from mfs_usertype to $userallowed
nly problem is how do i get the size of the file being uploaded?
and would it be easiest if i store the filesizes in bytes? or mb? or kb?