I'm glad to hear you got it working! And no worries -- most of our mistakes are silly. That's why long time coders have such flat foreheads. It's from smacking themselves. "Oh, my god, I can't believe I did that!"
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!