Time spent in forums: 2 Months 3 Weeks 5 Days 10 h 21 m 31 sec
Reputation Power: 1063
I'm sorry to say, but the people that "helped" you obviously have no clue of secure (and sane) web programming -- or maybe they just didn't care. This piece of code is wrong in pretty much every possible aspect.
I mean, it's up to you what you do with your server. If you're happy with your "solution", go ahead. But be warned and expect to be "hacked" as soon as some script kiddie finds your website.