Thank you once again for your replies.
This is indeed a strange problem. The funny thing is that it works perfectly on localhost, just not on my actual site. The only difference is the PHP version, which is older on localhost. :-/
I would rather not give up on writing my own, I've enjoyed learning PHP so far and want to continue, and I think experiences such as this are the best way to learn. Even so, thank you for the suggestion Rapid Dr3am.
It seems I have a strange understanding of the functions addslashes() and stripslashes(), but I'm going to continue playing and see if I can eventually fix this problem.
