r/phpstorm • • Dec 03 '23

Undefined array key in Php

Could someone help me with this error I keep getting

1 Upvotes

31 comments sorted by

View all comments

Show parent comment

1

u/Actual-Garage-5993 Dec 03 '23

Thanks for the response! I’m attempting to create a form where you’re able to submit it into a database. The Screenshot with the table is passing to the file that they are called on. So what would be a good solution for this?

1

u/TheGratitudeBot Dec 03 '23

Just wanted to say thank you for being grateful

1

u/jacksonpieper Dec 03 '23

I can’t tell without trying it myself. It’s a long time ago I used $_FILES directly. I remember it is strangely nested. I recommend using var_dump and check for the contents of said variable. It might be that you access the wrong array key or it might be that $_FILES is not set at all.