diff --git a/db/lamp_2017-12-03.sql b/db/lamp_2017-12-03.sql index 12cd285..310c54d 100644 --- a/db/lamp_2017-12-03.sql +++ b/db/lamp_2017-12-03.sql @@ -71,7 +71,7 @@ LOCK TABLES `Users` WRITE; INSERT INTO `Users` (`id`, `first_name`, `last_name`, `username`, `password`, `email`, `url`, `location`) VALUES (1,'shemona','singh','mona','pass','shemona.singh@uconn.edu',NULL,'milford'), - (2,'christopher','stumper','chris','pass2','chris.stumper@uconn.edu',NULL,'simsbury'); + (2,'chris','stumper','chris','pass2','chris.stumper@uconn.edu',NULL,'simsbury'); /*!40000 ALTER TABLE `Users` ENABLE KEYS */; UNLOCK TABLES; diff --git a/www/application/controllers/User_Tweets.php b/www/application/controllers/User_Tweets.php index 60769fc..ea30205 100644 --- a/www/application/controllers/User_Tweets.php +++ b/www/application/controllers/User_Tweets.php @@ -1,18 +1,15 @@ -load->database(); // load database - $this->load->model('User_Tweets_Model'); // load model - $this->output->enable_profiler(TRUE); +load->database(); + $this->load->model('User_Tweets_Model'); + $this->output->enable_profiler(TRUE); + } + + public function index(){ + $this->data['posts'] = $this->Users_Tweets_Model2->getPosts(); + $this->load->view('user', $this->data); + } } - - public function index() { - $this->data['posts'] = $this->User_Tweets_Model->getPosts(); // calling Post model method getPosts() - $this->load->view('user', $this->data); // load the view file , we are passing $data array to view file - } - -} diff --git a/www/application/models/User_Tweets_Model.php b/www/application/models/User_Tweets_Model.php index 9e01b77..81f7858 100644 --- a/www/application/models/User_Tweets_Model.php +++ b/www/application/models/User_Tweets_Model.php @@ -17,4 +17,3 @@ function getPosts(){ } -?> diff --git a/www/application/views/user.php b/www/application/views/user.php index 69b996b..b066d4f 100644 --- a/www/application/views/user.php +++ b/www/application/views/user.php @@ -12,6 +12,23 @@