The likely reason that you’ve had no responses is because you’ve provided no code.
Anyhow, having no idea what your problem is (and no way to help you, given the info provided) here are some discussion threads that might prove helpful (despite the fact that many are using PHP in the linked discussions):