Posts by Guilherme Ramalho • 485 points
48 posts
-
1
votes0
answers267
viewsQ: Slim API returns error only with AJAX request
Hello, I developed an API using the Slim Framework and testing one of the endpoints that with Postman works perfectly but when I request with AJAX, although it is sending exactly the same data that…
-
1
votes0
answers219
viewsQ: Problem to load view
Hello, I am consuming an API in my controller and, upon receiving the result, I would like to load a user panel view. But when the script arrives in the method $this->load>view() nothing…
-
1
votes1
answer1950
viewsQ: Send headers in HTTP Request with Curl in PHP
Hello, I made a function to make Curl calls to an API and I’m able to make the calls but I’m not able to send headers. Function: function curlRequest($endpoint, $verb, $headers, $params = null) {…
-
1
votes2
answers2270
viewsQ: Request blocked by CORS Policy
I’m making an API with Slim Framework and when I test the answer with Postman everything works very well, but when I put it on the server and tried to make an ajax call to test I got the error…
-
1
votes2
answers166
viewsA: How do I scroll through the following array using Avascript?
You could do: for (i=0 ; i<json.json.length ; i++){ var idDisciplica = json.json[i].idDisciplina; }
-
0
votes1
answer54
viewsA: Get value in Array Chunk
Tries: $obj = $teuArray[0][0]; $nomeTime = $obj->name_team;
-
0
votes5
answers11915
viewsA: Count number of Mysql query records in PHP
Ever tried to make: <?php $sql="SELECT id FROM processo"; $return = $conexao->query( $sql ); if ( $return == false ) { echo $conexao->error; } echo'Qtd. registros: ' .…
-
0
votes1
answer109
viewsQ: Error passing array as parameter for Eloquent object
I’m having trouble inserting a type 1:N record using Eloquent. When I pass the array with attributes to the object as the documentation guides an error is launched and when I print the error with…
-
0
votes0
answers45
viewsQ: Error loading Codeigniter Rest Server language
I am coding an API with Codeigniter and, as many have recommended, I am using the library Codeigniter Rest Server(Repository). I followed the tutorial recommended by the developer himself but I got…
-
0
votes1
answer142
viewsQ: Discussion about software architecture
I am rewriting an application for better structuring of it and I have arisen some doubts. The application is a football betting management system and has a web app for management and a mobile app…
-
0
votes1
answer47
viewsQ: Update record five minutes after insertion
I have a table with the following structure: tb_simulation: id(INT) | codigo(VARCHAR) | flag_valido(INT) | data_hora(DATETIME) | valor(DEC) I would like that five minutes after the record was…
-
0
votes0
answers408
viewsQ: Div fixed on top and another div with scroll below
Hello, I’m trying to (unsuccessfully) leave a div with menu components at the top and another div fix just below this. I left the first div fixed and put a margin-top on the second but when I scroll…
-
0
votes2
answers1004
viewsA: Transforming string text into picture
The first part of my question was answered by Anderson, already the part of sending Base64 to Whatsapp I found the solution with the phonegap plugin Social Sharing. You can share PDF, image, links,…
-
1
votes2
answers1004
viewsQ: Transforming string text into picture
Hello, I’m developing an app and I need to, at a certain point, take a string that contains data from a voucher and turn this text into a voucher image and then share this image via Whatsapp. I…
-
2
votes1
answer49
viewsQ: Rule for selecting records based on date and time
I am developing an online betting system and when selecting the games registered in the system I need to select only the games from the current day onwards, additionally I need to make sure not to…
-
0
votes1
answer53
viewsQ: Error making ajax call
Hello, I’m trying to make the following call ajax: function salvarAposta() { var nomeApostador = $('#nomeApostador').val(); var jogosSelecionados = $('#tabelaFinalizacao tbody tr'); var valorAposta…
-
0
votes7
answers874
viewsA: Extract Array content for PHP variables
Have you tried that? $array = ["InvoiceIdOut" => 879, "FiscalDocumentNumber"=>"AAAA879","InvoiceURL"=>"http://teste.pt/maistestes/AAAA879", "ErrorMessage"=>NULL] $invoiceIdOut =…
-
1
votes1
answer1042
viewsQ: Function js is executed several times
Hello, I am developing a football betting app that features a table with quotation values of different game modes for each registered match. For each match I have a table with the following code:…
-
1
votes1
answer542
viewsQ: Add one array within another
Hello, I searched how to add an array inside the other one but the result was not quite what I expected. I have the following code: else if ($_GET['type'] == "listaJogos") { //echo 'Tipo de…
-
1
votes1
answer26
viewsA: select returning blank and have already entered things in the database (php with msql)
You need to connect to the database and run the query. To connect would be something like: function conectar() { try { //Localhost $host = "localhost"; $user = "root"; $password = ""; $database =…
phpanswered Guilherme Ramalho 485 -
0
votes0
answers66
viewsQ: Help to mount select on the seat
Hello, I need to assemble a query in the database that returns a set of records but as I do not have as much experience in database I would like you to give me a help. I got the tables…
-
0
votes1
answer238
viewsQ: Hide form fields that will be required
Hello, I have a form that depending on what will be selected in a select will hide or display fields. The problem is that some of these fields will be of the type required and Submit will not…
-
1
votes1
answer711
viewsQ: Retrieve JSON values and mount HTML for each record
I’m having doubts about how to structure a JQuery that should append an HTML code to each of the items that a JSON returns to me. My question is how to retrieve each of the JSON values and make a…
-
2
votes1
answer95
viewsQ: Insertion of record with webservice returns error but inserts in the database
Hello, I have a javascript function that makes an ajax call to a php file that must insert the records in the Mysql database. Well, I am able to enter the records but the function is returning me an…
-
0
votes2
answers180
viewsA: Javascript connection to the database does not work
I was getting the following error on the console: Security Policy Directive: "default-src 'self' data: gap: ssl.gstatic.com 'unsafe-Eval'". Either the 'unsafe-inline' keyword, the hash…
-
1
votes2
answers180
viewsQ: Javascript connection to the database does not work
Hello, I am trying to connect to Mysql database with a Phonegap/Cordova project and am experiencing problems. First I created the Cordova project and the only change I made was importing Jquery.…
-
1
votes1
answer530
viewsQ: How to recover data from an HTML form opened in a Webview?
Hello! I have a responsive web application that I intend to open via android app through a Webview. Well, the only problem is that I would need to take some Submit data from just one application…
-
2
votes4
answers6560
viewsA: Telephone and CPF masks in Textfield
You can use the following plugin: Jquery Mask Plugin. I always use it and cater to my needs. But there are some things you need to do. First: Make sure that you are calling the Javascript function…
-
0
votes1
answer128
viewsQ: Error starting Android Studio after update
Hello, I was using Android Studio normally until the IDE asked me to update and that’s what I did. However after the update I received the following error: "No JDK found. Please validate either…
-
3
votes1
answer148
viewsQ: Align form items with CSS
Hello, I would like a help to align the items in the following form. I would like the selects Labels to stand above them to the example of inputs Labels. Additionally he would like the selects,…
-
0
votes1
answer81
viewsQ: PHP function only works on the first call
I am calling the same php function, in which I pass as parameter a database result, twice in the script but it only works in the first call. I realized that if I call the function that returns the…
-
0
votes1
answer943
viewsQ: Optimize select PHP+Mysql loading
Hello, I have a form where I need to load two selects receiving from the bank about 13,000 records each. Initially I created a function that loaded the records and printed the HTML code of the…
-
2
votes1
answer1232
viewsQ: Uncheck other checkboxes when selecting one
Hello, I have three checkboxes in my form and would like me to select one the other two are unchecked. I tried to use some examples I found here but it didn’t work as expected. It follows the HTML…
-
1
votes5
answers38138
viewsQ: Find Jquery Datetimepicker for EN
Hello, I’m trying to lacquer mine datetimepicker for en but am not succeeding. I tried to do the way they teach on the official page but could not. The plugin is working perfectly but with this…
-
0
votes1
answer59
viewsQ: Doubt to build Mysql query
In my system I have the following tables: tb_partida(id, data_hora, flag_ativo, tb_cotacao_id, tb_campeonato_id), tb_campeonato(id, nome_camp, tb_pais_id) e **tb_pais**(id, nome_pais,…
-
0
votes2
answers1217
viewsA: load a div with a php page
You have to pass via GET the name of the page you want the 'rules.php' to receive. I use the following structure to do this. Home page: <?php //Usuários $pagina['AdestraBasic'] =…
phpanswered Guilherme Ramalho 485 -
1
votes0
answers89
viewsQ: Automate logging into the database
Hello, I’m developing a system in which I need a list of all the football teams in the world and their respective championships. I have the following structure in my database: tb_time(id, name,…
-
1
votes1
answer228
viewsA: Select checkboxes that come from the database in the edit form
I managed to solve the problem, I’ll leave the code here if it is of interest to someone else. Follow the php code I used inside the that generates the checkboxes. <input type="checkbox"…
-
0
votes1
answer228
viewsQ: Select checkboxes that come from the database in the edit form
Hello, I have a user editing form that has some chekbox with city names that must be selected when the form opens. Well, I am selecting in the database the cities to which the user being edited has…
-
0
votes1
answer104
viewsQ: Error inserting record in child table with PHP
Hello, I have the following tables: |-----tb_usuario---------------------------------------------| |id - name - login - password - flag_active - permission|…
-
0
votes2
answers134
viewsQ: Select in table records with Mxn relation
Hello, I have in my bank a table tb_usuario (id INT, name VARCHAR, flag_active INT) and a table tb_regional(id INT, name VARCHAR,login VARCHAR, password VARCHAR). From the relationship between the…
-
1
votes1
answer117
viewsQ: Retrieve dynamically generated checkbox values
I have a form that has some checkboxes with city names that are generated dynamically by PHP. I’d like to know how to get these values and what kind of structure to store them (Array?) and what kind…
-
2
votes3
answers869
viewsQ: Questions to send data via POST
Hello, I’m trying to send over $_POST some data for validation and later insertion in the database, what I could do in another project exactly the way I’m trying to do now, but I’m not getting it.…
-
0
votes0
answers25
viewsQ: Mysqli query returns FALSE instead of returning database records
Hello, I’m trying to query the user login data in the php database but I noticed that the variable that receives the function that makes the query always returns empty and I var_dump this variable…
-
1
votes1
answer591
viewsQ: PHP says file doesn’t exist even if it exists
Hello, when I log in I redirect to a file called 'config.php' which in turn includes a file called 'usuario_dao.php'. The problem is that I get the following error: Warning:…
phpasked Guilherme Ramalho 485 -
0
votes2
answers53
viewsQ: Error with PHP function
Hello, I am developing this system for study purposes and whenever I try to do some operation like register, edit or delete I get the error message: "Fatal error: Call to Undefined Function…
-
1
votes2
answers5961
viewsQ: How to modify the default Datatables + Bootstrap layout
Hello, I used a tutorial I found on Youtube to use Datatables in my project. I managed to make everything work but the look didn’t get very cool as you can see below. So looking I found a section on…
-
2
votes0
answers214
viewsQ: How to display data dynamically in Jinternalframe?
I am making a little betting software and I am completely lost in being able to allocate data dynamically in my interface so that for each entry in the database a structure with a JPanel which will…