Posts by Lucas Deano • 439 points
20 posts
-
2
votes1
answer26
viewsA: Error with php array
Hello, Your code is doing exactly as programmed. You are creating an index in the array and assigning a correct value, however all indexes have the same name. In your case, this name is the tem. A…
phpanswered Lucas Deano 439 -
3
votes1
answer280
viewsA: Receiving data in Controller
it seems its function addUser is not called, just like the class UsuarioController is also not instantiated. Try changing your code to: Cadastrausuario.php <form…
-
0
votes1
answer52
viewsA: Javascript - function that retouches an object
Hello, Let’s start from the beginning and create your object correctly. See: function createCar(nome, estrelas, marca) { myObject = {}; // cria o objeto myObject retun myObject; } Now we come to…
-
0
votes1
answer224
viewsA: Javascript or Jquery, onblur event
Hello, good afternoon, there are some ways to do this, but we will use the functions blur and ajax from the jQuery library, as it is one of the simplest and easiest ways to do this. The Blur…
-
1
votes4
answers109
viewsA: Using the existing key_exists array
Hello, the solution to your problem is simpler than it looks. You should create a function that runs through the entire array (using the foreach) and check if that particular index is an array (for…
phpanswered Lucas Deano 439 -
1
votes1
answer334
viewsA: How to connect a socket over the internet
Hello, There are basically three possible connection cases, see: 1: In offline testing, simulating a server on your own machine, you use IP 127.0.0.1, the so famous localhost. This IP refers to the…
-
2
votes1
answer5640
viewsA: Send data via POST in javascript
Hello, There are a few ways to send posts to the server through javascript. The ideal is that you use forms in html itself, however for sending the post directly by javascript, the simplest way, is…
-
1
votes1
answer44
viewsA: Leave a unique javascript action for each "button"
Hello, Your code is working just as programmed, let’s note. Note that you give the slideToggle on all Divs with class panel-body, this includes the one you clicked and the one you did not click. To…
javascriptanswered Lucas Deano 439 -
2
votes2
answers488
viewsA: Keep your focus on Inputtext
Hello, it looks like you’re using jQuery, right? Try to focus the input on any screen click by using the function click. $(document).ready(function(){ $(document).on("click", function(){ var…
-
1
votes1
answer64
viewsA: Determine display order of ordered queries in MYSQL
Hello, try the following: SELECT ordem_comum, ordem_proposta, ordem_lancamento FROM tableName ORDER BY ordem_comum ASC, ordem_proposta ASC, ordem_lancamento ASC I hope I helped, hug!…
-
0
votes2
answers31
viewsA: Mysql search with input error
Hello, Your problem is on the following line: $pesquisaNome = $_POST['pesquisar_nome']; There is no input whose name is pesquisar_nome, the solution is to switch to nomeCliente, which is the name of…
-
4
votes1
answer373
viewsA: Why does my getElementById() not work!
Hello, As some friends have already said here, you are trying to catch an element that does not yet exist DOM, because what is inside the tag body shall be executed only after the execution of the…
-
0
votes1
answer229
viewsA: Which SQL command to use to change a character of the vehicle plate - Mercosur Standard
Hello, What you want to do is a little more complicated than it looks. Come on: to update the table, use the command UPDATE; to do what you want and modify a certain character in the string, the…
oracle11ganswered Lucas Deano 439 -
0
votes1
answer153
viewsA: I’m using JSON database and I have a question?
Hello, The JSON (acronym for: Javascript Object Notation) is a lightweight file format for exchanging messages between systems, not a database. Its popularity is mainly due to its simplicity of…
-
0
votes1
answer222
viewsA: Why is my append (jQuery) duplicating elements?
Hello, From a read in jQuery documentation on the functions append and html. The function append() add the content after the last element, already the function html() sets the contents of the…
-
0
votes1
answer39
viewsA: Select 3 Random values in mysql table
Hello, You can sort the result of your search randomly through the ORDER BY and of the crowd RAND(). Behold: SELECT * FROM ".PREFIX."cup_maps WHERE mappack='".$set['mappack']."' ORDER BY RAND() I…
-
0
votes1
answer93
viewsA: How to create link inside combo box?
Hello, To do this just create a function by clicking on any option in the list of cities that redirects the user to the right site. See: $("#cidades").change(function(){ var cidade = $(this).val();…
-
0
votes2
answers60
viewsA: Variable via POST to sed
Hello, In order for the PHP file to be able to change the file, it must be run as sudo and try to change the code to the following: $command1 = 'sudo sed -i "s/nome/'.$SEU_HOSTNAME.'/" hosts';…
-
0
votes1
answer29
viewsA: PHP - Getting user information through $_GET
Hello, good night The GET parameter type is passed to the server through the URL, so it must be present in the link, otherwise it will show that such parameter does not exist. In the link you use to…
-
2
votes2
answers99
viewsA: Arrow in select with div and jquery
Hello, good night So that the :after, as well as the :before work, you must define your content. As in your case the content will be an image and not any element, as a text, you do not need to fill…