Most voted "codeigniter" questions
Codeigniter is a framework for developing PHP applications.
Learn more…1,026 questions
Sort by count of
-
0
votes2
answers1036
viewsMake an SQL query with codeigniter
I’d like to pull some information from my database called "website", inside it would connect to the table: "posts" and in it wanted to show the information as: "id, updated, title, Description,…
-
0
votes1
answer565
viewsHow to instantiate an object in Hooks to use in the Codeigniter Controller?
I have a class that will manage some of my dependencies. I want her to be called before any method be called on the controller, and for that I am using Hooks. The problem is that I don’t know how to…
codeigniterasked 7 years, 3 months ago Lucas Lima 773 -
0
votes1
answer540
viewsCodeigniter - Only one line of a LEFT JOIN
I have a table that is related by the id of the other. One contains the document data, the other contains the images related to the document. More precise that in this specific query only the first…
-
0
votes1
answer142
viewsHow to use csrf class in codeigniter with onchange event?
I have the following situation: Form <?php $atributos = array('id'=>'cadloja','class'=>'form-inline','role'=>'form','data-toggle'=>'validator'); echo form_open('',$atributos); ?>…
-
0
votes0
answers494
viewsCall to a Member Function method() on string
I am using Codeigniter and, while trying to do a search in my database to see if a given line really exists, it presents the error Call to a member function checarId() on string. Follow the code of…
-
0
votes1
answer46
viewsCron creating files on the server
I have the controls: curl https://meusite.com/acesso/cron/cotacoes wget https://meusite.com/acesso/cron/CPTEC It performs these two commands which are responsible for saving some photos on the…
-
0
votes0
answers77
viewsGroup tables and return to json
I have this function that returns the data to Ajax: public function get_agenda(){ $this->db->select('prospect_agendamento.age_data_agendado_para as start, prospect.pro_nome as title,…
-
0
votes1
answer733
viewsAjax request error with Codeigniter (url)
I have a very strange problem, in case anyone can help, I thank you in advance. I’m developing an application on Codeigniter 3.1.6 with PHP 7.1 and Bootstrap 4. The start screen presents a list of…
-
0
votes1
answer149
viewsOptimize Codeigniter code
I have a system for registering debt negotiations. Suppose I register a negotiation with 3 installments. Being: Parcela || Valor || Vencimento || Situação 1 || 100,00 || 01/09/2017 || Pago 2 ||…
-
0
votes1
answer99
viewsCodeigniter - array pass to controler
Good afternoon everyone, I have a problem in my code and I would like a help to solve it. It works like this: I receive a form of 3 variables (id_event, quality_user and id_user - the latter comes…
-
0
votes1
answer54
viewsGet name in Select Join
See the following function: $id_contratos = array_map(function($item) { return $item['id'];}, $result['contratos']); $empresa = " -- aqui eu preciso recuperar o nome da empresa --"; $view["empresa"]…
codeigniterasked 7 years ago Wagner Fillio 1,328 -
0
votes2
answers242
viewsMultiple upload to PHP online server
I have the following function to send multiple images: //Diretório onde a imagem será gravada temporariamente $dirToSave = 'assets/uploads/'.$pasta.'/'.$tipo.'/'; if(!is_dir($dirToSave)){ echo "noa…
-
0
votes1
answer642
viewsIF condition codeigniter - Check whether data exists in the database(model)
I have the following method to obtain data in codeigniter. // Obter Fase public function obter_fase($id) { $this->db->from($this->tbl_empresa_fase);…
-
0
votes0
answers210
viewsFile not found in PHP
I installed a script and is working properly, but on the site there is a restricted area and when logging in, the site drops and gives the following error: An Error Was Encountered Unable to load…
-
0
votes1
answer1105
viewsAccess-Control-Allow-Origin error
Personal I am trying to make a request from one server to another to perform a registration, but I always get returned this error: Failed to load http://domain: Response to preflight request doesn’t…
-
0
votes1
answer642
viewsRedirect after executing codeigniter function
Below I show the code that I use to call a function after performing the function I use a redirect to the home page, however I want to give a modic to this because if the user uses some filter when…
-
0
votes1
answer58
viewsMongodb query works in shell, and does not work in PHP
I need help with the query in the mongoDB database, in the shell I can perform the search normally, however on the site I get the error 'not authorized for query on'. I use the mLab service for…
-
0
votes1
answer26
viewsMy codeigniter is using another database instead of the one I selected
I have 2 projects, one is the copy of the other, one I want to leave online and the other test for me to program on top, so I copied the database and copied the project, changed the name, changed…
-
0
votes1
answer35
viewsChange default value of a function parameter
I’m migrating a system made in Codeigniter from version 2 to 3, I’ve done most of the steps that the manual but there’s one of them that I have a question, the step 11, because it says that some…
-
0
votes2
answers539
viewsMy css url is not working in codeigniter
Good morning, I’m learning to use codeigniter, and I’m having a problem with my css... inside the Applications folder I created another folder called layout, which inside it will have a header.php…
-
0
votes1
answer108
viewsshow user by informed Codeigniter plate
Hello, I would love your help, because I don’t work in the area, but I love to learn, I started to work with codeigniter, I’m making a system for the people of my work, today everything is done in…
-
0
votes0
answers36
viewsRoute error in php
I started developing a system using the codeigniter framework 3. In localhost I had no problems with routes, but after I put the system on the server started showing problems in the views routes.…
-
0
votes2
answers261
viewsCodeigniter - Active Record - Query - Update Method Database
Hello! I ask this question in order to remove a doubt I have, and to be able to read other people’s ideas, of how I can insert or delete an item, to a certain operador_id. As the first image shows,…
-
0
votes1
answer231
viewsDatatables Jquery does not render column button in Codeigniter
I’m trying to put action buttons on my table through the datatTable plugin. My Javascript code $(document).ready(function(){ var table = $('#dataTable').DataTable( { "processing": true,…
-
0
votes0
answers104
viewsComparison between Array and Database, Codeigniter inclusion and exclusion
I decided on this question, a question I had about including and removing items that was in the array and was not in the database or vice versa. So I tried to use the same method for a team record,…
-
0
votes1
answer156
viewsHow to load two tables in a single select (html)?
I have two client charts, one called personal and one called personal I need to load both tables within 1(a select) using php and codeigniter 3.6. Be able to load the personal table, as follows the…
-
0
votes2
answers277
viewsCodeigniter-friendly URL with emphasis on SEO
Friends, I am developing a blog in CI. And thinking about the blog SEO, I would like the URL instead of being presented this way: https://meusite.com.br/blog/postagem/1 I would like it to be shown…
-
0
votes1
answer804
viewsPOST de imagem, via ajax
hello basically what I want to do is a system similar to the facebook, to create posts. Where you press to send the photo, choose the photo and automatically the photo goes to the server and has a…
-
0
votes1
answer892
viewsTake data from bank and compare CODEIGNITER
Good afternoon, you guys, I was trying to create a login system for a college job when I came across the following: I’m using Codeigniter and MYSQL I have a user database where you have registered…
-
0
votes2
answers181
viewsGenerate multiple records in Mysql
In the Mysql have two tables: CUSTOMERS | codigo-cliente | nome | grupo | valor | |----------------|------|-------|-------| FINANCIAL | codigo-cliente | codigo-boleto | grupo | valor |…
-
0
votes1
answer265
viewsHow to get id of a CRUD element [Codeigniter]
My question is this: I have a CRUD done in CodeIgniter, but the table rows are not in format localhost/crud/produtos/[:num]. In the last column of the table there are action buttons to edit and…
-
0
votes0
answers31
viewsAjax (Angularjs) returning HTML from the page itself
I am using Codeigniter to retrieve the database data. Controller: <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends CI_Controller { public function…
-
0
votes1
answer168
viewsCodeigniter does not present its Welcome screen
I started learning codeigniter a few days ago and I have the following problem: I did the correct installation of LAMP and of Codeigniter /var/www/html/codeigniter But when I try to access the page…
-
0
votes1
answer291
viewsHow do I take a view image (html) and send it to a controller (php) using codeigniter?
I need to give a picture of mine view to the controller, be it just the string with the url or the whole html element, for me it doesn’t matter because I will use to mount a pdf through the mpdf, am…
-
0
votes1
answer154
viewsReturn Value from Select
Hello, I would like to know how to recover a result from a select in Controller to perform a sum of variables. I have two selects that I need the resulting value of them to add inside the…
codeigniterasked 6 years, 7 months ago Rafael Mazzieiro 1 -
0
votes1
answer174
viewsHow to translate this query to Codeigniter query Builder?
I’m having difficulties to assemble this query in Codeigniter, someone can give a little help? select venda_itens.secao, venda_itens.secao_nome, sum(venda_itens.qtd_itens_finalizada) as qtd_itens,…
-
0
votes2
answers131
viewsMerge php arrays
Hello! There is the possibility of joining array’s ? If yes how can I do ? What I got Array ( [Dashboard_1] => 1 ) Array ( [Configuração_2] => 1 ) Array ( [Usuário_3] => 1 ) Array (…
-
0
votes2
answers864
viewsconsult with Internet in codeigniter
Good afternoon, folks, I’d like to ask for your help on something I’ve been racking my brain about and I can’t seem to get it right have 4 tables products ->id | Slug | title | info1 | info2 |…
-
0
votes0
answers60
viewsProblems when passing parameter by POST via Ajax
I’m having trouble passing parameters via POST to my PHP methods. I have the variable in JS properly populated with the attributes I want to pass on. But when trying to access the variable in my PHP…
-
0
votes1
answer1356
viewsIs it possible to hide parameters from the URL with PHP?
I have a php project with codeigniter that gets dominio.com/?id=212454&survey=complete and after I save this data in a variable, I wanted to remove it from the url, just getting dominio.com My…
-
0
votes2
answers721
viewsHow to change the main URL in Codeigniter
I need to change the URL of a site in Codigniter, at the site root: "public_html" has the "application" folder of the Framework and has the folder: "site_new" which is where the current site is.…
-
0
votes1
answer56
viewsCodeigniter - Retrieve bank categories
I have a table ''category'' in the database and it has the column 'id' and 'title', I am recovering the same in several menu’s dropdown, but loads all categories of the database but I would like to…
-
0
votes1
answer47
viewsAlternative to the Codigniter table component
I am developing the following screen using Codeigniter: My difficulty is in leaving the code in an elegant way, without the use of the table library (I think it is not the most suitable for what I…
-
0
votes1
answer46
viewsHow to treat value and use for certain action in Codeigniter?
I am creating a system, in which the user when registering needs to be checked before the release of access. I have in the bank the following: use_status => 1; For approved users! use_status…
-
0
votes1
answer72
viewsHow to upload an Error 404 page to the website and another to the HTACCES application?
.htacess of the site # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond…
-
0
votes1
answer199
viewsHow to pass variable between views?
My problem is this. My project’s Dashboard has an input where the user inserts the process number and clicks to search, as code below: <form class="navbar-form navbar-left" role="search"…
-
0
votes1
answer195
viewsHow to make a datatables data be clicked by calling another view?
Good afternoon guys. Follow the code of my view, which is working fine. It turns out that I would like to do the number of the process (2º <td>), be clickable by calling another view. It is…
-
0
votes1
answer51
viewsHow do I add values from different tables?
I have two tables (Costs and Receipts) where I need to make one sum of the field containing values of each of them, after making a calculation (Balance) showing the balance of the Revenue - Costs =…
-
0
votes1
answer174
viewsWrong date format
I have a problem and I have no idea how to solve, it is the following: The date on a system I am modifying does not show in View correctly. Is this way: 0404/0606/2018181818 9:56:19 AM Where should…
-
0
votes1
answer183
viewsURL problem in codeigniter 3
I have an application on a server: http://192.168.0.200/aplicacao When I authenticate to access this error appears: The requested URL /application/auth/login was not found on this server. I searched…