A good start would be to make sure you’re running the latest versions of whatever scripts you’re using.
If it’s stuff you’ve written yourself, then it’s not as simple. You’d need to go through all of the code and find what went wrong.
In that case, a good start would be making sure that all user input is checked and that people can’t just pass anything they want into your scripts.
If you’ve already contacted support, I’d imagine they’ll give you an idea of what went wrong, or where the problem is.
Save up to $96 at Dreamhost with ALMOST97 promo code (I get $1).
Or save $97 with THEFULL97.