I think you might be "eating" the error on the php side. instead of complete try using success: and error: to handle errors n such.
take a look here for more info on error handling
http://www.openlogic.com/wazi/bid/18...n-and-Handling
could you show the javascript block as it appears on client side also please? might help.