• My post is marked as an answer. But I still would like some feedback to make sure that you understand how and why the code was simplified.

    Also that you understand the remarks made by Jacob and Drew.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2