Posts by tkmtts • 1,310 points
45 posts
-
0
votes1
answer55
viewsQ: Search records filtering by Count from a subconsulta
I have the following problem: I have three tables and need to show the employee record only when it has 1 and only 1 dependent. And it should also have 0 and at most 1 prize record, according to the…
-
0
votes1
answer1282
viewsQ: Take the data attribute value of an input file field
I am in need of help with the following situation I have several input files fields with the same name and which are used to do various file uploads. <form> <label> Foto…
-
0
votes1
answer159
viewsQ: Upload several input files via Ajax
Hello I need to upload files via ajax, where each event of clicking the input file, I already upload the corresponding file. I do not know how to do this dynastically, since what changes between a…
-
0
votes1
answer154
viewsQ: Get generic input field checked with jQuery
I’m having a hard time getting the value of checkboxes marked through jQuery after a Ubmit. It turns out that the input checkbox fields are generated dynamically by a database query, and I’m not…
-
0
votes1
answer88
viewsQ: Doubt to take the name of an automatically generated php input field
I have a legacy system in php that generates the input radios, and the names of these fields are dynamic, such as the $Row object. And now I need to take the values of the radio fields and their…
-
1
votes1
answer33
viewsA: Task in the Moodle
Place the value of 1 in the Send Settings option>Maximum of attempts
-
2
votes2
answers3115
viewsA: Problems with UTF-8 ISO-8859-1 mysql php accentuation
On your connection, use set_charset: $connMysql = mysql_connect('localhost', $myUser, $myPass); mysql_select_db($database, $connMysql); mysql_set_charset('UTF8');
-
2
votes1
answer205
viewsA: Translate theme of Moodle
You should go to site administration/language/language customization, and select the language, after the selection open the language pack and do the job of "ant" looking for the strings in each…
-
3
votes1
answer428
viewsQ: PHP - Real Time Application
A doubt I need to make an application that from time to time validates whether a session is valid through a bank query. This query must be done automatically, without the need for a user action,…
-
1
votes1
answer55
viewsA: How to get a list of all questions and alternatives Moodle?
Follow SQL to generate the list of questions and answer alternatives: SELECT q.id, q.questiontext as questão, q.qtype as tipo, qa.answer as alternativas FROM mdl_question q INNER JOIN…
-
1
votes1
answer880
viewsA: Moodle SQL - table of record answers of a questionnaire per student
I think you get something, with a similar query to this, adapt it according to what you need: SELECT DISTINCT q.id, q.name, q.questiontext, qw.id, qw.answer,qa.id, qa.rightanswer as resposta_aluno…
-
1
votes1
answer166
viewsA: Moodle integration with third-party system
Use the Moodle API itself to perform integrations, so you don’t need to change the Moodle core. https://docs.moodle.org/dev/Web_service_API_functions Here on Github are some examples for use:…
-
3
votes1
answer2338
viewsQ: Digital Line Boletus Field Mask
Would anyone know if there are any masks for the type line of billets? I have a screen where the list of boletos of a client is displayed and I also display the entire typeable line, without points…
-
2
votes2
answers426
viewsA: $_GET[] does not work
Try passing the load variable as parameter in your url index.php?load=VALOR
-
2
votes1
answer163
viewsA: Animated website
It seems that websites use Javascript, HTML and css and PHP, which are the basis for the web. In addition there is a wordpress cms on the last site, which has all these technologies already embedded…
-
2
votes3
answers1601
viewsA: Help me with the "Undefined index: referrer in " PHP error
There is no variable $referrer and you are trying to verify the variable that was not set at any time. This is why it is important to check with the isset function(); if(isset($_GET['referrer'])){…
-
3
votes1
answer1154
viewsQ: Add columns of a table to a total field and repeat the sum to each new row
I have a table with some columns for typing values and I need to add the total of these values in a final column. The sum is easy to do, however the table and dynamic and are generated multiple…
-
4
votes2
answers207
viewsA: When start the site already ask login
Taking the idea of friend Localhost I would include/require a php file that validates whether the user is logged in or not on your system, because already thinking about the long term and the growth…
-
6
votes3
answers3023
viewsQ: Foreach Array incrementing another array
with a doubt in performing a foreach and incrementing another helper to perform an Insert in the bank, see only: When I send a form via post I have the following array as a result: array (size=2)…
-
2
votes1
answer88
viewsA: php session is broken when soon on two sites on the same apache server
Places the session path for each site(Whereas there are two Codeigniter installments). Inside the config.php file in application/config look for the line: $config['cookie_path'] = '/'; And put the…
-
5
votes1
answer3762
views -
0
votes0
answers60
viewsQ: Merge array via a comparison
I need to compare the arrays using the key called code, and if the keys are equal, join the arrays in a single array, see the example below: $array1 = array(array('id' => '1',…
-
3
votes2
answers2715
viewsQ: Xdebug in Xampp
I’m having trouble activating Xdebug in xampp, since I can’t find the directives in xampp to configure Xdebug. How do I add the Xdebug extension in xampp php.ini?
-
2
votes3
answers4152
viewsA: PHP Parse error: syntax error, Unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING
I think you can still use a ternary as an option: <?php $dado['st_nome'] == "FINALIZADO" ? $link = "dashboard.php?link=17&id=".$dado["op_id"]: $link= "#"; ?> <a href='<?php echo…
-
4
votes1
answer2180
viewsA: Change the colors of google Charts
I believe the Voce documentation may have a pass of which parameters should be updated: var options = { width: 400, height: 240, title: 'Toppings I Like On My Pizza', colors: ['#e0440e', '#e6693e',…
-
4
votes2
answers1766
viewsA: Show result of a query in html - PHP+Codeigniter.
Using the MVC structure, but remembering that this is an example in which it can be changed and improved: In the model Voce: class Entidade_model extends CI_Model { public function __construct() {…
-
0
votes2
answers63
viewsQ: Operator Bitwise Right
Hello Conducting some studies on PHP I came across bitwise and until then all its operations has not been anything difficult, just the one of the right shift An exmeplo I took and I still don’t…
-
3
votes1
answer46
viewsQ: Formatting stdClassObject for array
I have a problem to convert some data into my system, I have the following code snippet that returns an array with a few objects: Array( [4014] => stdClassObject([id] => 4014[registro] =>…
-
3
votes1
answer1174
viewsA: Problem with codeigniter (mysqli) BD connection
I already had this problem, and in case it was the mysqli driver that was not enabled in my php. See if in your php.ini the driver is enabled, and in case of doubt, use the link below for query.…
-
2
votes1
answer408
viewsA: Run Xdebug in netbeans to debug Codeigniter
I managed to solve the problem In the advanced settings menu perform settings i left to debug the URL in the default option, and in the path mapping I left blank. I don’t know why, but when I create…
-
2
votes1
answer408
viewsQ: Run Xdebug in netbeans to debug Codeigniter
I’m trying to debug an app in codeigniter via Xdebug in Netbeans. However, when running my app in debug mode, I can’t reach my controllers or any breakpoints after the first line of codeigniter…
-
3
votes1
answer753
viewsQ: Amount of elements in JSON
How can I find out the amount of elements of a json file through PHP. See the example of my file: [{"descricao":"Fotografia","codigo":784},{"descricao":"Filmagem","codigo":789}] I would like to…
-
1
votes1
answer98
viewsA: Questions to implement a web service
The solution implemented was the one that Andre reported by the following link: Remote REST webservice in PHP receiving JSON via POST with problems…
-
3
votes1
answer68
viewsA: php / Content Manager
You can start with the most used which is Wordpress, for content management: Wordpress Besides it has others free, and each with its particularities: Joomla Concrete5 Drupal It is up to you now to…
-
0
votes1
answer1407
viewsQ: How best to use templates in Codeigniter 3
I am using version 3 of codeigniter and inserting the concept of templates through the PARSER library, according to the CI documentation itself…
-
3
votes1
answer624
viewsQ: Include a file external to Codeigniter
I am trying to make an integration between a system developed in Codeigniter(CI) with Moodle and I need to include in the CI a file from the Moodle library, to recover some data. However I am not…
-
3
votes2
answers71
viewsA: Tool for working in a group
Dude if you’re working with development, I recommend you to focus on your projects. You can use Git for this, where each employee can edit the same file and save different verses:…
-
2
votes2
answers1672
viewsA: Notification using PHP and Webservice on Android
I use google GCM, where Voce can send push notifications to the user’s device. Here’s an example of how to use PHP https://github.com/mattg888/GCM-PHP-Server-Push-Message And here’s another example:…
-
0
votes2
answers118
viewsA: Save form data without obligation to update image
I always put it like this: if (!empty($_FILES['userfile']['name'])) { //definicoes do UPLOAD aqui } That way, it only uploads if I upload a file
-
5
votes1
answer98
viewsQ: Questions to implement a web service
I have a question about the implementation of a web service, look at the logic: I have a process that searches the data of several users in a system (system A), and I want to take this data and send…
-
0
votes1
answer147
viewsA: Site does not pull local style settings
Make sure your base_url is pointing the right way when you moved up your hosting. No config.php in application/config: $config['base_url'] = 'http://www.suahospedagem.com' Also check the redirect…
-
-1
votes1
answer300
viewsA: How to release a specific folder through the use of htaccess?
Tries to create a configuration file by exclusively releasing this Lib folder. See an example with the following solutions already posted: How to release a subdirectory protected with . htaccess?…
-
4
votes2
answers1802
viewsA: Framework to create admin dashboards and dashboards
I think you can try to work with some free and try to understand how the template works, because most work with the union of several libraries like Bootstrap, Angular, Jquery and by. As you already…
-
0
votes1
answer604
viewsA: Encryption for wordpress plugin code
Dude, if you want a protected plugin, I think it’s feasible to create a premium plugin and validate the license each new installation However, I believe that if your plugin is important to other…
-
5
votes1
answer1028
viewsQ: Difference between new project command and create-project command
What is the difference between commands laravel new nome-projeto and composer create-project laravel/laravel nome-projeto --prefer-dist? In both cases the result is the same but in the case of via…