I am trying to connect to a osCommerce Database with a little PHP scripting but there is a small error, ideas

oscommerce
Brian D asked:


I am trying to connect to my osCommerce database with the script:

?php
$osC_Database = osC_Database::connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
$osC_Database-selectDatabase(DB_DATABASE);
?

where I ofcourse have the DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD and DB_DATABASE info. The problem that I am having though is that I am getting a Fatal Error the page says:

Fatal error: Undefined class name ‘osc_database’

I got this class from this source:

http://www.oscommerce.info/kb/osCommerce/Developers_Section/Classes/1

Any help?

THanks,

Brian

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Webnews
  • MisterWong
  • Y!GG

1 comment to I am trying to connect to a osCommerce Database with a little PHP scripting but there is a small error, ideas

  • Bingo

    Make sure you remember to include or require the osC_Database class file(s). I cannot find information of the files names from the link you provided, but I think the error means PHP does not understand the class you are trying to use.

You must be logged in to post a comment.