I am currently working my way through the fourth edition of 'Build Your Own Database Driven Web Site Using PHP and MySQL' and I'm having a problem with the delete joke example in Chapter four.

The add/list jokes example worked fine. When it suggested attempting the delete joke bit I did so but got the following error:

"HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request."

I decided to give up and go with the exact example in the book, which wasn't a million miles away from my own attempt. Unfortunately I still get the same error.

I'm using a Mac with OS X 10.6.8, PHP 5.3.6, Apache 2.2.20 and mySQL 5.0.8.

Any help is appreciated.