Hello,
I’m trying to run a query that will check the total amount of space a user has taken up with their file uploads and enforce a limit to that amount of space. I’ve already setup the upload handler to insert file name and location, as well as username and file size into a mysql table. All of that works properly and the data gets correctly stored. So, my query runs in the upload handler before anything other than the session/page protection. This is what I’ve come up with:
[code=php]$mine = ($_SESSION[‘user_name’]);
$limit = mysql_query(“SELECT SUM(‘fsize’) FROM UploadedFiles WHERE username = ‘$mine'”);
if ($limit => “10485760”) die(“You have exceeded your storage limit.”);
When I add this to the upload handler, the upload form seems to work, but hitting “submit” loads a blank page with the URL pointed at “upload.processor.php”. Error handling is set to ‘all’, but no errors are showing up, and if from that blank page, you try to view source, that’s blank too. I’ve been searching this all day and can’t figure out why it won’t work, although, this is the first time I’ve tried to use the SUM function. The file size shouldn’t be an issue as I’ve set it in php.ini and on the html form, to 10mb. I’ve tried about 10 different variations of this and none of them work. Any suggestions?
Thanks