Jump to content

bernardSP

New Members
  • Posts

    1
  • Joined

  • Last visited

bernardSP's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. HitCounter.php CountVisits2.php I'm struggling with this assignment, I'm not sure what I'm doing wrong! If somebody could please point out what my errors are that would be great. I attached the two files I'm using above; below are the directions for the assignment: this is the error I get "[03-Apr-2014 21:10:56 America/Denver] PHP Fatal error: Call to undefined function my_sql_fetch_row() in /project5/HitCounter.php on line 78" "For this project, you will create a HitCounter class that counts the number of hits to a Web page and stores the results in a MySQL database. Use a private data member to store the number of hits and include public set and get member functions to access the private counter member variable. Note, you must develop 2 php files for this project. The first is a class called HitCounter.php and the second is a file called CountVisits.php. The CountVisits file will be the one used by the user and it will instantiate an instance of the HitCounter class. The HitCounter class takes care of opening the database file and table and obtaining the current number of hits, placing that number in a private variable. That private variable is accessible in the object by calling the "get" function. Before terminating, the CountVisits program has to set the new value using the "set" function (in the class definition, the "set" function should increment the current counter by one and update the database). Note that part of the constructor function in HitCounter.php should be to check to see if your table exists and then create it, if it does not, and initialize the table with values."
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.