in reply to Debugging a login script using MySQL

I do not know why your script dies, but are you sure you really want to use it? It seems very insecure.