Jump to content


OOP Problem

  • Please log in to reply
No replies to this topic

#1 ufg

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 22 April 2006 - 01:04 PM

Hello everyone,

I am very new to PHP (been learning/coding about a month now), and while I am coding my site I have come across a major stumbling block.

I am writing a very basic CMS for my site (and for a couple of friends) but I seem to be having some trouble with the OOP part. How it works is like this:

index.php - checks if files and things exist, if they do it includes them and then includes the file "content_display.php" which handles everything else, like the URL format (index.php?page=login)

content_display.php - need access to the classes but everytime I include these files I get the error "Cannot redefine class MySQL in file ....."

header.php - also needs access to the classes but I get the same error as I do with content_display.php
menu.php - same as header.php
the various mod files (like register.php, login.php) also the same as the other files.

I hope somebody actually understands what I am trying to say, if it would help I can probably release the source for you all so that maybe you might be able to better understand me.

P.S. Sorry if this is in the wrong place.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users