Posts by ThiagoYou • 540 points
26 posts
-
0
votes3
answers156
viewsA: How to make the counter work to allow three attempts?
To ask login 3x you also need to put the "prompt" within the loop of repetition. To increment the counter you can directly use the operator "++". This operator, when used before the variable it…
javascriptanswered ThiagoYou 540 -
1
votes1
answer41
viewsA: How to capture data correctly from the list?
If I understand your question correctly, you would like to add only the value of the new item added. The fastest solution is to just reset the price variable and add it all up again. Override…
-
1
votes2
answers331
viewsA: PHP - Curitiba WS semrpe returns 403
Updating the correct answer to the problem: Actually the endpoint must be yes HTTPS, the endpoint with HTTP exists but does not work to transmit the RPS files (NFS-e), strangely it can be used to…
-
0
votes1
answer410
viewsA: Curitiba WS - problem sending the certificate
For someone who is still with this error, after so long I managed to make the communication work with the WS of Curitiba (ISS). First, the certificate used must be exactly the same file imported in…
-
0
votes1
answer82
viewsA: PHP/Bootstrap radio selector not working
In this case you can use the function "isset" to test if the variable exists: <input class="form-check-input" type="radio" name="sexo" id="sexo" value="M" <?php echo isset($sexo) &&…
-
1
votes2
answers104
viewsA: Use/change property of an extended class and print by instance
It’s not exactly what you were trying, but maybe this can help you: class ClasseA { public $retorno = null; protected $error = "Erro desconhecido"; public function __get($name) { require_once…
-
1
votes2
answers294
viewsA: Group data into a php table
Perhaps the following approach will work, but for this it is necessary that the list is ordered by "Cdoe" (as it appears in your example), so the Dexes with the same code will always be one after…
-
-1
votes2
answers811
viewsA: "Illegal string offset" error when calling usort in database data
Edit: As corrected in the comments, the error "Illegal string offset" happens when you try to access the index of a string using another string (as explained best in the other answer). And the…
-
2
votes1
answer136
viewsA: How to search word snippet within XML using PHP
You can use the native function strpos: if (strpos($val->title, $_POST['nome']) !== false) { [seu codigo] } strpos (PHP 4, PHP 5, PHP 7) strpos - Find the position of the first occurrence of a…
-
2
votes3
answers307
viewsA: transform result into an array so -Function select php
I believe that Function a little more simplified should work. I just removed some unnecessary elements and narrowed down an array layer you were inserting: Array with one layer less:…
-
3
votes1
answer44
viewsA: Problem with HTML Manipulation with PHP
You need to use the slider to escape the double quotes in the class: echo "<p class=\"play\"> {$row["email"]}</p>"; Or you can just swap the double quotes for single quotes echo "<p…
-
1
votes1
answer403
viewsA: Php post approval system
You need to pass the id of the element you want to update as a parameter in the function call: PHP code: <?php while ($row = $sql->fetch(PDO::FETCH_ASSOC)): ?> <div class="post">…
-
5
votes2
answers416
viewsA: What is the difference between $('.botao'). on('click') and $(Document). on('click', '.botao')?
When you use the: $('.botao').on('click'); You are linking the click event to each element that contains the class ". button" already existing in the document. The main problem of this method is…
-
1
votes3
answers377
viewsA: Onclick to display result
The following code must solve: $("body").on('click', '#executar', function(e) { e.preventDefault(); const campo = $("#busca").val(); $.post('processa.php', {campo: campo}, function(data) {…
-
0
votes1
answer37
viewsA: How to redeem a plugin’s startup value?
Your variable "Carousel" is defined in a global context, so I believe it can be used normally within its function. function startProgressBar() { $(".slide-progress").css({ width: "100%", transition:…
javascriptanswered ThiagoYou 540 -
0
votes1
answer109
viewsA: How to set a background with Jquery
I believe the problem is in its HTML structure. The id of an HTML component should be unique, in which case it seems that you use several div’s with the id "color". In this case, you should use some…
-
0
votes1
answer73
viewsA: Upload Csv with php error: Undefined offset:
The error of "Undefined offset" usually happens when you are trying to do some operation with the nonexistent value of an array. In CSV (or excel) files sometimes comes empty rows and columns, which…
-
0
votes1
answer62
viewsA: Multiple queries and then sort those results in order to appear in order by date
You can’t minimize the use of so many ties by joining all the querys into one? For example: (sql updated to list user posts as well) "SELECT * FROM `friend_list` AS `fl` INNER JOIN `post` AS `p` ON…
-
2
votes1
answer298
viewsA: Search and display of results 2 tables mysqli/php
You need to match the fields of the two tables, so the amount and name of the returned columns will be equal. SELECT `titulo`, `foto`, `descricao`, `conteudo`, `data`, '' as `local` FROM `noticia`…
-
0
votes1
answer171
viewsA: Combobox with Mysql
Make sure you are not forgetting to close some html tags. And it also seems that the first select (within the form "unit") is not within one with some class "col", so this may be causing the problem…
-
0
votes1
answer410
viewsQ: Curitiba WS - problem sending the certificate
I am trying to carry out the communication with the WS of Curitiba (ISS Curitiba) for the sending and query of RPS lots (lots of NFS-e), but the WS always return me the error: "E504 - Error: Service…
-
0
votes2
answers331
viewsQ: PHP - Curitiba WS semrpe returns 403
I am trying to send an NFS-e (XML, RPS batch) through the Curitiba webservice, but the connection with Curl always returns error 403 (without permission). I have linked the certificate in the City…
-
0
votes1
answer44
viewsA: Add success message and don’t quit to the.php process
If I understand correctly, do you want to send the form and then display a success message without reloading or redirecting the screen? If so, maybe the code below can solve. JS file:…
-
0
votes1
answer104
viewsA: Dual dropdown dependent on Yii2
If I understand correctly, you want to call the two routines (input and output) in the same event? If this is the case, in your example you are recording two "onChange" events, making the second one…
-
1
votes1
answer1201
viewsA: How to update a Dropdownlist without refreshing the page
-- Edited to improve response and add code. In your Json you need to access the function that saves your new city and then return a complete list of all cities, including the new city added. After…
-
-1
votes2
answers768
viewsA: How to format Yii date?
Try using the native function to own PHP: $mode->sua_data = date('d-m-Y', strtotime($model->sua_data)); date // Format a date for other formats strtotime // Turns a String into datetime (date)…