Thanks for your fast reply.
I try to make a test ,using widget_helper.php and your example in the first page’User_login’.
I fellow the steps, like in the jen’s post, but I get this error:
input->post(‘loginform’)) { if ($post['username'] == 'admin') { $query = $this->db->query("SELECT uid FROM user WHERE username='admin'"); $result = $query->row(); set_cookie('ci_user', $result->uid, 86500); redirect(); } } if ($visible) $this->render(‘user_login’); } }application/widgets/User_login/index.php
Fatal error:
Class ‘User_login’ not found in C:\xampp\htdocs\application\helpers\widget_helper.php on line 49
but When copy and past the class of the’ User_login’ in the ‘widget_helper’, the view is rendred but I get this:
input->post(‘loginform’)) { if ($post['username'] == 'admin') { $query = $this->db->query("SELECT uid FROM user WHERE username='admin'"); $result = $query->row(); set_cookie('ci_user', $result->uid, 86500); redirect(); } } if ($visible) $this->render(‘user_login’); } }
A PHP Error was encountered
Severity: Warning
Message: extract() expects parameter 1 to be array, string given
Filename: helpers/widget_helper.php
Line Number: 69
I’m working on the Project of the End of Studies and I really need your help
I’m waiting for your answer as soon as possible.
Thanks