Posts by MichellHenrique • 89 points
23 posts
-
2
votes1
answer46
viewsQ: When trying to create date October 31, result is December 1
Today I went to visualize a graph that I have and I realized that it was all messed up but I didn’t understand why. I looked, reviewed, retested and no going back to normal. I’m guessing it’s a date…
-
-3
votes3
answers444
viewsA: hide id passed in url
Some of that kind of trouble bothered me, too. My alternative was to create tokens for users, which ended up being very useful and opened new features in the development. In my case I created…
-
0
votes0
answers54
viewsQ: Request/query capability using PHP + Mysql
Hello, I am developing a project and I lack some theoretical and practical knowledge about the operational, requirements and responsiveness of PHP + Mysql. I am creating the project API initially in…
-
0
votes1
answer98
viewsA: How to divide a variable by the values of an array in php
Type Thus? function divisao($n, $a){ for ($i=1; $n > 1; $i++) { $n = $n / $a[$i-1]; echo "Divisão ".$i.": ".$n."<br>"; } } divisao(60, [5, 4, 3, 2, 1])…
-
0
votes2
answers105
viewsQ: Password_verify() problem in PHP
My intention is to call a page redirect if the password is not correct using header(), however, I realized that it was not working. I’ve been reducing the tests and I’ve come this far: // Senha…
-
0
votes1
answer53
viewsA: Password Protection in PHP
From what I understand, briefly: The function I use is relatively safe, but password_hash implements and raises security by generating random Salts. The mentioned function generates a kind of salt…
-
-2
votes1
answer53
viewsQ: Password Protection in PHP
I have a function implemented in my system that makes the password storage as follows: function codifica($usuario, $senha){ $codifica = crypt($senha,$usuario); $codifica = hash('sha512',$codifica);…
-
0
votes1
answer26
viewsA: MYSQL queries doing Table Scan even using index key
Well, I’m still trying to understand why some queries aren’t using the index key. I believe it will still take a while to analyze everything better, however, I update the response. First thing I…
mysqlanswered MichellHenrique 89 -
0
votes1
answer250
viewsA: Run PHP command in Centos 7 via shell_exec()
Sometimes I use shell_exec + php, but more in Debian-derived systems. To work properly, I often need to configure the permissions of the user that php uses, I think it is the www-data user in debian…
-
2
votes1
answer26
viewsQ: MYSQL queries doing Table Scan even using index key
I started recently to study the performance of the queries in MYSQL, I am trying to use EXPLAIN to go analyzing and improving the indexes of my tables, until I came across the following situation. I…
mysqlasked MichellHenrique 89 -
0
votes1
answer1023
viewsA: HOW TO RUN AN APP WITH DOCKER
How do I run an application in these containers? In a rough way you should enter the container and install the program, it helps if you have created a volume or a sharing point when creating the…
dockeranswered MichellHenrique 89 -
0
votes1
answer64
viewsA: How to pull information from the database in an organized way
From what I understand the difficulty is in query the database and not in printing the records using PHP. Anyway I believe that you are looking for CROSS JOIN... SELECT * FROM dental CROSS JOIN…
-
1
votes1
answer79
viewsA: how to solve the modal problem by taking the last id
Answer here: Example 1 Example 2 Let’s see if there’s feedback now Hehehehe…
-
-1
votes2
answers61
viewsA: Random generation
Have you ever thought about doing this procedure in chain? I don’t know C, so I’m not going to risk it, but I’m going to try to pass the logic involved, and then you just go to C and use Rand... var…
-
0
votes3
answers563
viewsA: View information in Modal with foreach
Italo, I don’t know how your modals are, but if you don’t create a modal on the page for each record, I believe that your line of reasoning won’t work (and even if you had so many modals, it…
-
0
votes1
answer36
viewsA: Only register if Checkbox is checked
HTML <input type="checkbox" name="checkbox" value="Termos e Condicoes"> PHP if(isset($_POST["checkbox"])){ echo "Checkbox Marcado"; ... // Cadastre o usuário ... }else{ echo "Checkbox…
phpanswered MichellHenrique 89 -
0
votes2
answers25
viewsA: Same download form for different pages, how to save to which page was downloaded?
Take the name of the page with basename( FILE ), then just save to DB. $pagina = basename( __FILE__ ); https://www.php.net/manual/en/function.basename.php…
phpanswered MichellHenrique 89 -
0
votes2
answers362
viewsA: How can we leave only the first uppercase letter of each paragraph?
Answer: Html (index.html): <form method="post" action="teste.php"> <textarea name="texto" cols="50" rows="5"></textarea> <input type="submit"> </form> PHP (test.php):…
phpanswered MichellHenrique 89 -
0
votes2
answers402
viewsA: Change the FORM border when the internal INPUT is in focus
Thus? Form: <form class="form-inline my-0 my-lg-0 lozano-search"> <input class="input-pesquisa" type="search" placeholder="buscar" aria-label="Buscar"> <button…
cssanswered MichellHenrique 89 -
0
votes1
answer155
viewsA: Add arrays in PHP JSON file
Hell, more time to understand the problem than to answer... Anyway, you can’t go out saving, adding and concatenating the code like this, because sooner or later it ends up giving problems, you must…
-
0
votes1
answer73
viewsA: Help to abort jQuery.ajax request, jQuery.post
After much research I ended up finding the solution, actually it has nothing to do with jQuery.ajax or jQuery.post and yes with the php page, because in it I use a session that ends up blocking the…
jqueryanswered MichellHenrique 89 -
0
votes1
answer73
viewsQ: Help to abort jQuery.ajax request, jQuery.post
I use a php page to monitor new entries in the database for 30s and so far everything works fine, the problem is that I can’t leave the main page immediately, because it is waiting for the reply of…
jqueryasked MichellHenrique 89 -
0
votes1
answer103
viewsA: Modal inside table - Mysql
I do not know much but I use some modals similarly, I will try to explain to help... First in the modal, let’s take the qrcode image and put a div with id="qrcode", so we can change the content with…