r/PHPhelp • • Nov 01 '25

Solved Undefined Array Key - Send Help!

Hello,

Looking for some assistance. I am currently doing a course on PHP and inputting data from a database but I'm getting an error "Undefined array key"

Can someone help me and tell me what I've missed?

https://pastebin.com/kepyjqyq

The code was copy and pasted direct from what the lecturer gave us.

I'd ask my lecturer but with it being the weekend they are unavailable until Monday and this is annoying me.

Thanks

3 Upvotes

11 comments sorted by

View all comments

Show parent comment

5

u/Aggressive_Ad_5454 Nov 01 '25

I’ve been programming for half a century and I started making case mistakes since I first got my hands on a dumb terminal that had lower case, in 1979. Happens to everybody. All the time.

I try not to use database identifiers ( table, column names ) with any upper case characters in them because I’m too stupid to remember which characters were upper case.

1

u/Theo468 Nov 01 '25

Going forward I'll only be using lowercase, my reason was to make it look a little nicer and more ordered I guess. Thank you though, still feel stupid