What are common issues when uploading JPG files using PHP?

One common issue when uploading JPG files using PHP is that the file may exceed the maximum upload size limit set in the php.ini file. To solve this, you can increase the upload_max_filesize and post_max_size values in the php.ini file or by using the ini_set() function in your PHP script.

// Increase upload size limit
ini_set('upload_max_filesize', '10M');
ini_set('post_max_size', '10M');