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.
What errors (if any) are showing in the error logs for MySQL, Apache and PHP?
Thanks for your help ... that should have been the first thing I thought of!
I checked the Apache error_log and saw the following:
PHP Notice: Undefined variable: mysqli_query in /chapter4/addjoke/index.php on line 71
... and ...
PHP Fatal error: Function name must be a string in /chapter4/addjoke/index.php on line 71
I'd stupidly put a dollar sign in front of the mysqli_query() call! Schoolboy errors all round!
Thank for your help and sorry for wasting your time. Although I've learnt my lesson
Good! Glad that you fix it
This topic is now closed. New replies are no longer allowed.