Codeigniter remove follow button after following user |
Hi I am able to display users friends on a page but when I into the friends profile I still see the follow button, is there anyway I can remove the button after following? I am using codeigniter. see code.
Model: Code: public function get_friends($user_id = NULL){ Controller Hi I am able to display users friends on a page but when I into the friends profile I still see the follow button, is there anyway I can remove the button after following? I am using codeigniter. see code. Model Code: public function get_friends($user_id = NULL){ Controller Code: public function view($user_id = NULL){ View Code: <?php
You're passing $data['friends'] to your view. But in the view, you immediately overwrite $friends with some session variable 'user_id2'. So, the friends from your model aren't recognized.
(08-07-2017, 07:27 AM)Wouter60 Wrote: You're passing $data['friends'] to your view. But in the view, you immediately overwrite $friends with some session variable 'user_id2'. So, the friends from your model aren't recognized. You are right there, but you see in the view when I use $friends['username']; it throws an error saying Message: Undefined variable: friends, even when friends is defined in the controller.
You are not passing the $members[] array in the controller.
Something seems to be missing eitehr in your controller or view.
On the package it said needs Windows 7 or better. So I installed Linux.
|
Welcome Guest, Not a member yet? Register Sign In |