Please start by editing the PHP code. You need to add a bunch of echo statements to it to pinpoint the statement that causes the problem. It's a common debugging technique, so you should have no problem getting it done of finding help on the Net.