PHP Help

Out of context: Reply #16

  • Started
  • Last post
  • 19 Responses
  • sherm0

    in your classes file, the db connection doesn't mention host.

    typically you'd specify:
    host
    username
    password
    db_name

    unless $mysql_db is the host.

    Line 18 refers to extends someClass..
    this line should be at the top where you have Class myClass extends SomeOtherClass

    I have never seen it written where its on its own line without saying which class is inheriting the behavior of another class..

    I would recommend, learning to write this stuff the procedural way just to know what is going on. How can you expect yourself to debug Object Oriented PHP without knowing how it works?

    It should be easy enough if all you are doing is connecting then querying the db and outputting a result.

View thread