Before upload file into database check file size in php use echo $_FILES[“file”][“size”];. $_FILES[] use for integrate the get file value and file is the input file field name.
For example:
Form:
<form method="post" enctype="multipart/form-data"> <input type="file" name="file"> <input type="submit" name="upload"> </form>
PHP:
<?php if(isset($_POST["upload"])){ echo $_FILES["file"]["size"]; } ?>
Question and answer is powered by AnsPress.io