SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Oct 2007
    Location
    Merseyside, UK
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Build Your Own Database Driven Web Site Using PHP and MySQL 4th Ed. Ch.4 delete prob

    Hi

    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.

    Thanks

    Keith

  2. #2
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,067
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    What errors (if any) are showing in the error logs for MySQL, Apache and PHP?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  3. #3
    SitePoint Member
    Join Date
    Oct 2007
    Location
    Merseyside, UK
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  4. #4
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,259
    Mentioned
    245 Post(s)
    Tagged
    1 Thread(s)
    Good! Glad that you fix it


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •