In the rare event that the script has no errors, yet it still does not work -- you can also add in code that will email you debug information... what is also fun is finding the email address of your cell phone and having info sent to you that way...
I used to get hourly hit reports to my cell phone before I got tired of watching the stats ;) For example if you are worried about your script crashing while you are away on a trip -- emailing errors to your cell phone could save your ass! (I think I got that idea from the hotmail programmers).
You can also output debug info to a file... Also let's say someone is trying to cheat your script -- you can set up some code to track an individual IP and log all of that person's activities w/o them knowing...
------------------
...from the nectar of the Bone flows all that clicks...