Posts by Marcelo Ágil • 334 points
16 posts
-
2
votes8
answers44013
viewsA: How to remove auto complete input from google Chrome?
Autocomplete="off" may not work in several cases. I decided to add this javascript after the page onload: var randomicAtomic = Math.random().toString(36).substring(2, 15) +…
-
1
votes2
answers4145
viewsA: Script not authenticated
Wictor Keys' answer is correct in parts. It also has the following question: you have loaded javascript as HTTPS but it does an ajax call without using HTTPS (for a php page for example), it will…
-
0
votes1
answer214
viewsA: Codeigniter or PHP Queue (queue)
Staff at Laravel there is a cron function that keeps working on the backstage, as if it were the cronjob of linux. Turns out I didn’t find this on Codeigniter, what I did was very simple: 1- I…
-
2
votes2
answers48
viewsA: How do you "memorize" an action on a website?
You can use the Web Storage (HTML5): Example: // Guardar localStorage.setItem("cor_css", "vermelho"); // Obter (aí você precisa moldar esta info recebida e aplicar nos objetos que você deseja…
answered Marcelo Ágil 334 -
4
votes1
answer97
viewsQ: How much each function "costs" to the server
My question is about function is_dir to find out if there is a directory. How much does it cost for the application to use this function? How to measure the use of this or another function in PHP?…
-
1
votes3
answers1913
viewsA: Return last index of Array
You can use _.last as explained here: data = [1,2,3] last = _.last(data) alert(last)…
-
1
votes2
answers60
viewsA: How to bring a result from a . php page to another . php page using javascript?
You can use ajax but in your example it is easier so: Your form: <form method="post" id="CODNOME" action="imprimir.php"> <nav class="zz z_meio2 borda "> insira o codigo <br>…
-
1
votes1
answer214
viewsQ: Codeigniter or PHP Queue (queue)
I’m doing a massive upload of files to a photo server. It happens that until sending all the photos, the user ends up waiting a long time. Then they gave me the tip to search about queue or Queue.…
-
3
votes2
answers1892
viewsA: How do I use "include/require" in Codeigniter the right way?
Hello. The answer marked as correct does not respond to when the person really needs to do a include or require. For those looking for a way to include a PHP (in this case a library), even knowing…
-
0
votes1
answer84
viewsA: Manually create client_secret in PHP for Laravel + OAUTH2
discovered by researching "in the gringa": $secret = bin2hex(random_bytes(32)); UPDATE The way above didn’t work, but the way below, yes: $secret = base64_encode(hash_hmac('sha256',$password,…
-
1
votes1
answer84
viewsQ: Manually create client_secret in PHP for Laravel + OAUTH2
Problem: I have an application with auto-installer. When the user sets up your account, I would like to manually register it in the table oauth_clients, already with a secret of his own. If I do…
-
0
votes3
answers252
viewsA: Return the row of a table when the value of Count(field) is 0 in Mysql
You can structure your query in a different way, look at this example of the stack: SELECT IFNULL(SUM(TOTAL), 0) AS total, IFNULL(SUM(5STAR), 0) AS FiveStar, STORE, DATE FROM `table` WHERE DATE…
-
1
votes1
answer1686
viewsA: Get external website image as data:image/jpeg;Base64
Translating from Stackoverflow english: If you have allow_url_fopen set as true: $url = 'http://example.com/image.php'; $img = '/my/folder/flower.gif'; file_put_contents($img,…
-
0
votes2
answers153
viewsA: Error while displaying array in PHP
When you find this error: Undefined index: email (or whatever) It means that you are trying to take from the object an indexer that does not exist (a position that does not exist). A good solution…
-
1
votes1
answer544
viewsA: View modal when sending data to a PHP database
So, I’ve been through this and it seems that your solution is AJAX with HTML5 validation. Your question is unclear, but I’ll take that as a yes. First, you change your button to not launch the…
-
3
votes5
answers11915
viewsA: Count number of Mysql query records in PHP
If your query is just to count the total records, you can make a very economical consultation according to w3schools.com: $query = mysql_query('SELECT COUNT(id) AS result FROM processo'); $total =…