Posts by Gustavo Eklund • 187 points
14 posts
-
2
votes4
answers868
viewsA: How to make Empty() accept the value 0?
I’m late, but I hope I can help someone: I bumped into a case where it is necessary to check an index of a array, using the other examples, you may get the error Undefined Index. Generally use the…
phpanswered Gustavo Eklund 187 -
0
votes1
answer197
viewsA: Reload table without updating whole page? Mvc Applications
You will need to manipulate the DOM dynamically via Javascript, imagine that you have a table, just delete it and rebuild it with the new data when the server returns a response. The example you…
-
1
votes2
answers1017
viewsQ: Image upload React Axios and PHP
I need to make a posting system that includes image and post data with Reactjs, Axios and PHP(yes, php). No Reactjs const post = async (formData) => { const image = new FormData()…
-
3
votes1
answer46
viewsQ: Proptypes always gives error no matter if the value is correct
I’m using the React (16.11.0) with Proptypes (15.7.2) and Hooks. And I have a component that receives an object with some data from the database. Testing the data using the console.log: {…
-
0
votes2
answers214
viewsA: I need help Variavel i
Just concatenate the value into a string: var resultado = '' for(var i = 0; i < 5; i++) { resultado += String(i) } console.log(resultado)…
javaanswered Gustavo Eklund 187 -
4
votes2
answers47
viewsA: How to make a text be edited only once in Javascript/Html
Here I used a generic button, but you can use only include the 'disableInput' function in the main code <input type="text" id="imageName"/> <button type="button"…
-
0
votes1
answer41
viewsA: Return cluster in Mysql vector
The only solution I found was through PHP even though there is a better way to do it: // Se a requisição ocorrer com sucesso if ($stmt->execute()) { // Se algum registro for encontrado if…
-
1
votes1
answer41
viewsQ: Return cluster in Mysql vector
I am trying to assemble a Mysql query with multiple joins, in this query has a column that may or may not come duplicated, I would like to put the duplicated rows by this column in an array, using…
-
1
votes1
answer2673
viewsQ: React Hooks useEffect even with empty dependency runs more than once
I am using the React hook useEffect to fetch the data in an API, when the page loads, useEffect runs 2 times, but should run only once, since I declared the second parameter (dependency array) as…
-
1
votes2
answers161
viewsA: Keep data in the PHP form textbox | HTML
This happens because every time you submit the form, the page reloads, so we need to make an asynchronous request, ie make a post without reloading the page. First add the following parameters in…
-
3
votes2
answers120
viewsQ: What is the difference between using variable and passing direct parameter?
I wanted to know the real difference and between $sql = 'select * from tbl_blablabla'; $result = $connect->prepare(sql); and $result = $connect->prepare('select * from tbl_blabla'); Not just…
-
1
votes1
answer56
viewsA: Codeigniter - Retrieve bank categories
From what I understand you would actually need to generate every 'li' of the table by php itself using the while loop: $query = "select * from sua_tabela where seus_parametros"; try { $result =…
-
1
votes1
answer118
viewsA: Dynamic innerHTML in search results
The solution was in the face, only had not preceded: function initMap() { const autocomplete = new google.maps.places.Autocomplete(document.getElementById('searchBox')); }//Campo de pesquisa…
-
1
votes1
answer118
viewsQ: Dynamic innerHTML in search results
Well, I’m developing a search field for an application, where the user type an address or name of an establishment and the system returns the results dynamically, but in the results I need to return…