codeigniter-3

data not filtering in ajax codeigniter

ぃ、小莉子 提交于 2020-01-06 08:44:10
问题 I want to filter data by dropdown but it giving me all data.... this is my model with ajax function public function ajax() { $query = "SELECT * from info_user Where user_status ='1'"; if(!empty($size)){ $query .= " and city in('".$size."')"; } if(!empty($sprice) && !empty($eprice)){ $query .= " and charge_per_hour >='".$sprice."' and charge_per_hour <='".$eprice."'"; } $result = $this->db->query($query); return $result->result(); } And this is my controller public function ajax() { $size =

How add image into form with fields code Codeigniter

微笑、不失礼 提交于 2020-01-06 07:42:13
问题 I am new to Codeigniter and new to the MVC webdesign, i have plant insert form i want to upload image and save image name into database i tried many codes but not works please help me to write upload function plant insert form is below here <?php echo validation_errors(); ?> <?php echo form_open('AddPlant/InsertPlant')?> <div class="form-group has-error"> <label for="name">Name <span class="require">*</span></label> <input type="text" class="form-control" name="name" /> </div> <div class=

How to load data to a particular section of the page without refreshing the whole page in php-codeigniter

一笑奈何 提交于 2020-01-06 06:01:13
问题 Sorry if you find this question wrong. In my website, I have two divs, one div contains the image selected by the user, I have previewed it by Jquery. Then in controller I fetch this image and applied flip operation of Codeigniter, now my question is How to load the second div with flipped image (which will come from controller) without refreshing the whole page? I have three div's, how to load data in only a particular div without reloading the complete page in php-codeigniter? I know about

Not getting the expected output from the model query. What query should I use?

六月ゝ 毕业季﹏ 提交于 2020-01-06 05:57:25
问题 I am using Codeigniter, I have a table and I am inserting the data into the database and data are inserting two times depends on the year and six months. So my table data is ------------------------------------------------ id |m_id | primary | secondary | Duration ------------------------------------------------ 1 | 1 | 100 | 80 | 12m ------------------------------------------------ 2 | 1 | 50 | 40 | 6m ------------------------------------------------ 3 | 2 | 300 | 150 | 12m -----------------

Cannot Catch Errors in Stripe payment gateway in Codeigniter 3

心不动则不痛 提交于 2020-01-06 04:35:11
问题 I am very new to stripe payment gateway integration. I am facing a problem on catching errors. I saw their official documentation for catching errors, but nothing is working. My payment is working fine and when I enter the correct information stripe takes my payment and successfully redirect to the success page, but the problem happens when I tried with wrong information it doesn't give me any error just shows HTTP 500 error (In production environment). When I set error_reporting(E_ALL) then

How to change url of GET method form to slashes in codeigniter 3 [duplicate]

杀马特。学长 韩版系。学妹 提交于 2020-01-05 13:14:23
问题 This question already has an answer here : How to extract get variable from query string in codeigniter? (1 answer) Closed 3 years ago . I can not find a solution to my problem, if my question is a duplicate, please provide a reference link. so I need your help. Here's for example: localhost/ci/index.php/search/?song=sheila+on+7 to be localhost/ci/index.php/search/sheila_on_7 or localhost/ci/index.php/search/song/sheila_on_7 Thanks. 回答1: CodeIgniter optionally supports this capability, which

CodeIgniter routes issues to access the frontend and backend folder

﹥>﹥吖頭↗ 提交于 2020-01-04 06:58:38
问题 I am using CodeIgniter. I have frontend and backend folder inside controllers and views. I tried server steps even check almost all the solution but still I am not able to access it my default controller routes.php $route['default_controller'] = 'frontend/User_control'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; /*backend*********************************/ $config['backend'] = 'backend/Access_control'; 1) My issue is When I am accessing the Url http://localhost

CodeIgniter routes issues to access the frontend and backend folder

陌路散爱 提交于 2020-01-04 06:56:33
问题 I am using CodeIgniter. I have frontend and backend folder inside controllers and views. I tried server steps even check almost all the solution but still I am not able to access it my default controller routes.php $route['default_controller'] = 'frontend/User_control'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; /*backend*********************************/ $config['backend'] = 'backend/Access_control'; 1) My issue is When I am accessing the Url http://localhost

How to merge arrays from different input values.?

柔情痞子 提交于 2020-01-04 04:02:27
问题 There are many text field with same name and same class with different values and each input have 1 button. I get the value from each one of the fields by clicking on each specific button. Using with Javascript. And i can put that value into array but the arrays are not merge. If i click on 1st button the specific input field value is put into the array, then i click on 3rd button the 1st value in array is removed and the new vlaue (3rd row's value) is stored in array. How can i store all of

codeigniter data passing controller->library->view

不想你离开。 提交于 2020-01-03 19:04:43
问题 I have a codeigniter problem. Im trying to send data from a controller , to a library , to a view. i get this error in the view: Message: Undefined variable: crimes FileName: views/crime_view.php Line: 45 while debugging , i dump the $data variable, and get: that shows that my variables exist. in the library , im getting the controller data by using: $data[] = $componentData; that would not work in this case. but if i in the library do: $data['crimes'] = "test"; then it will work. for some