- Joined
- Jun 16, 2024
- Messages
- 2
- Reaction score
- 0
So i made a variable called $extension and when i use it in my code i keep getting this error: Undefined variable $extension and error 500.
heres the code:
heres the code:
PHP:
$extension = strtolower(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION));
$errors['image_file'] .= in_array($extension, $file_extensions) ? '' : 'Wrong file extention ';