I am working on PHP. My question is How can restrict a user can upload only three images in a month.
My Mysql Database table --
CREATE TABLE `images`
The basic idea is to count all images uploaded in the given month by given user, like:
SELECT COUNT(*) FROM `images` WHERE `user_name` = ? GROUP BY MONTH(`date`);
If the query above returns 3, you can prevent the upload.
3