pass variable from javascript function to controller method in codeigniter
问题 I'm new in CodeIgniter. I am making a project in which I make a javascript function in view an in this I define a variable .. it looks like this var $rowCount=0; function invest() { $rowCount=$('#ulinvestment').find('.rowInvestment').length; } my controller function contains function input(parameter //i want to pass $rowcount value here ){ $this->load->helper('form'); $this->load->helper('html'); $this->load->model('mod_user'); $this->mod_user->insertdata(); } I want to access the variable