Posts by Renato Gonçalves • 338 points
11 posts
-
1
votes2
answers330
viewsA: Enable and disable button for dynamic elements in cart
This is happening because at Function habilitaButton() you are going through all the "action-delete" Divs and inserting in them the Update Button, the correct is to check if the current index is the…
-
3
votes0
answers59
viewsQ: How to know what should be protected by Encryption on a Site?
I would like to know how I define/know if a site I will develop needs to be "protected by encryption"? Of course, excluding obvious cases such as card data in an e-commerce for example. I guess not…
-
1
votes2
answers1140
viewsA: How to change the color of a div every 40 seconds?
You can do this with jQuery simply, as follows: $(document).ready(function() { var colors = ["#f9f9f9", "#049fce"];//Array com as cores, pode adicionar contas quiser var i = 0;…
-
4
votes1
answer1005
viewsQ: Best Way to Use AES Encryption
Guys, let’s say I’m working on a system where the encryption key is derived from the user’s password (something like what Keepass does), in which case I have three questions: What algorithm to use…
-
3
votes1
answer858
viewsA: Save variable after refresh php
To solve your "problem" I recommend that you save this variable in a session, or even in a cookie to be able to use it later. If you wanted to save in a session, on the page that takes the data from…
-
0
votes2
answers68
viewsA: Page Preview Error with PHP Code
Code structure is with a small error, the correct serious: <?php } if (isset($_POST['submitBtn'])){ ?> <div class="caption">Resultado do Login:</div> <div…
phpanswered Renato Gonçalves 338 -
3
votes3
answers322
viewsA: How to know the names of the array positions in php?
The function you are looking for (if I understand correctly), is called array_keys(). To use: <?php $keys = array_keys($_POST['nome']);//Armazena nome das posições como um array…
-
0
votes1
answer160
viewsA: Calling Component method on all controllers in Cakephp 3
I’ll leave here the way I solved my problem/dilemma, in case someone needs to do the same thing I do. In the beforeFilter() from Appcontroller, I called the method I created from my custom Component…
-
2
votes2
answers686
viewsA: Youtube video popup
I believe that the error that Phpstorm is pointing is related to the link, because it does not make sense to tag <label> within the <a> as it is: <a <label…
-
0
votes1
answer160
viewsQ: Calling Component method on all controllers in Cakephp 3
I’d like to know how to call a method from a Component I created in Cakephp 3 on all controllers, as well as the Auth that checks whether the user is logged in or not on all pages (controllers). But…
-
1
votes1
answer147
viewsQ: Stop Jquery request by refreshing the page or clicking on a link
I am using long Polling with PHP + Jquery, when the user enters the site a background connection to the server is opened through Jquery this way: var req = $.post //(resto do codigo aqui). This…