php - Applying restriction to user -
im working on php-based login system user can upload csv file database. user restricted can upload file 5 times per session , cant upload more.can give me idea best way accomplish this? tq.
there few things come mind. 1 have session keep track of how many uploads person has made simple counter. when you're processing file uploaded, first check make sure hadn't uploaded five, , increase count. once reach 5, stop displaying upload form.
another option, may unnecessarily complicated purpose (but still practice) keep database record of every file user uploads, details. way, know when last uploaded file, how many had in stretch of time, etc.
Comments
Post a Comment