Programming Could someone please explain the issue with this variable?

  • Please we urge all unregistered users to swiftly register to enable you enjoy loads of benefits rollingout in our community. Be open to opportunities to do good for someone else today. Anything that do not please God in your life has come to distroy you.
banner
Programming related thread

AdServersite

Member
Premium User
Nov 24, 2023
173
0
16
33
Abuja Nigeria
I created a variable named $extension, but I keep getting the following error when I try to utilize it in my code: $extension is not defined; there is an error 500.
This is the code:

PHP:
$extension = strtolower(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION));
$errors['image_file'] .= in_array($extension, $file_extensions) ? '' : 'Wrong file extention ';
 

BSF For Soul Wining Support Donation

Total amount
$0.00
Goal
$1,000.00
Donation ends: