Posts by Luigi Azevedo • 181 points
24 posts
-
1
votes2
answers108
viewsA: Mark only one radiobutton for each line
About why Radio doesn’t work, that’s what Augusto already said. You cannot use the same name for all buttons and there is no need for the name to be an array in your displayed code, as only a single…
-
1
votes3
answers49
viewsA: Send form to database with Mysql and php
As your POST has not yet been initialized (it is empty), this notification appears. To resolve you can hide the error or use the condition is set if(isset($variable)){ // True if it has contents in…
-
0
votes1
answer49
viewsA: How to Iterate Checkbox and Foreach in PHP and JS
The input id needs to be unique, you are using the same id every time. Tries to generate a unique id for each repetition with a variable and pass this id as parameter to the function. var checkBox =…
-
1
votes2
answers315
viewsA: delete from a row of the selected table
I believe the solution can be done with PHP itself. This code will delete all lines that have checkbox marked. <form method="POST" action="paginaDelete.php"> <input type="submit"…
-
2
votes1
answer62
viewsA: PHP Difficulty understanding error
With the help of Anderson, I managed to solve the problem. The final code is as follows: $update = "UPDATE usuario SET senha = '$hash_pass' WHERE recuperar_senha = '{$_POST['recuperar_senha']}'";…
phpanswered Luigi Azevedo 181 -
-1
votes1
answer62
viewsQ: PHP Difficulty understanding error
The code is responsible for updating the user’s password in case they forget and generate a new hash to recover the password, I do this so that the password recovery link works only once. The…
phpasked Luigi Azevedo 181 -
2
votes1
answer117
viewsQ: PHP - Pattern in Datalist
I want to make a datalist field where the user can type to find what they want faster, but I do not want the user to be able to put something outside the suggested values, so I am using Pattern, but…
phpasked Luigi Azevedo 181 -
0
votes3
answers101
viewsA: Form data is not sent to the database
Change to the following: else { $sql = ("INSERT INTO tarefas (nome, descricao) VALUES ('$nome', '$descricao');") or die (mysql_error()); $result = mysql_query($sql); // Executa o insert echo "Tarefa…
-
0
votes2
answers188
viewsA: How to clone Divs from a past Select number?
Your answer has already been achieved, but I did an example in PHP, in this I used a datalist, so the user can create as many fields as you want. <?php echo' <div> <form…
-
0
votes1
answer697
viewsA: How to find the highest value of a matrix?
You can create an IF condition inside the repeated, it will look like this: controle = 0 (0 ou algum valor da matriz) for(...) . if n > controle: controle = n . . Let’s assume that the first…
-
-2
votes1
answer51
viewsQ: Delete table data with no need to reload page to update
I have a table with data of a certain equipment, above the table has a field where the equipment number is inserted and quantity, the other information comes from the bank through the equipment…
-
1
votes1
answer516
viewsQ: PHP page inside a DIV after Submit
I have a form where the user type what equipment he wants to consult and AFTERWARD to click confirm, I need the fields with the information appear. These fields are in another PHP file that will…
-
-1
votes3
answers5007
viewsA: Accent error in mysql
Use the following command in the tables that are giving problem with accentuation. ALTER TABLE `sua_tabela` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; This is because the Charset set set…
-
0
votes2
answers664
viewsA: How to add value to an array without losing the previous value?
Since you didn’t post the code I’ll make an example for($mes = 1; $mes <= 12; $mes++) { $Val[] = $mes; } echo 'janeiro '.$Val[0]; echo 'março'.$Val[2]; That way the value will not overwrite, if…
phpanswered Luigi Azevedo 181 -
0
votes3
answers785
viewsA: Return Focus to the window that opened the popup
Disclaimer: I don’t have enough points to comment, so I’m answering here. Test the following code by running along with your already done <script> $(".botao").click(function(){…
-
0
votes1
answer114
viewsA: Difficulty in While Loops and Foreach
1º Check if you made the connection with the bank correctly 2º Use simple quotes $displays['id_client']; $displays['name']; $displays['message']; $displays['cliente_name']; $displays['data_ret']; 3º…
-
1
votes1
answer52
viewsQ: Pop up to print, keeping the action values
I have a form that when pressing Ubmit it takes the selected value and takes to the target page of the action and opens the page, but overlap the current page, I need to take these values of the…
-
0
votes1
answer111
viewsA: Store select value fed by SQL and change the WHERE query
Solution. <li><a>Tabelas Mensais</a><br> <form id="form1" name="form1" method="get" action="folhapgt_imprimir.php"> <select name="data_selecionada" id="data">…
-
0
votes2
answers81
viewsQ: Table populated by other tables
I need to create a table with PHP and Mysql that is filled by other tables, all tables have a column centro_cost, I also made a column code, for each centro_cost but I’m not sure how to implement…
-
-2
votes1
answer111
viewsQ: Store select value fed by SQL and change the WHERE query
I need the user to select a date in the combo box, change the value of the variable corresponding to the period in WHERE, to show the table only of the corresponding period. SELECT <select…
-
-2
votes1
answer133
viewsQ: Table with variable size in HTML
I need an HTML table to be powered by a database but the amount of data is variable. The number of columns is fixed but the number of rows may vary. It is necessary that the table fits the volume of…
-
3
votes2
answers124
viewsQ: Time on stopwatch
I wonder how to implement time on my stopwatch. The timer works, but the minutes pass 60, I need to pass 60 minutes there is a conversion to hours. <script> // Tempo em segundos var credito =…
javascriptasked Luigi Azevedo 181 -
1
votes1
answer895
viewsA: Change page content without having to go elsewhere
You can use Javascript by leaving hidden parts until the "button" is pressed. For example: The button is hidden: < input type='button' id="boot" style="visibility:Hidden;" /> Then just create…
-
-4
votes2
answers736
viewsQ: Timekeeper
I’m developing a project for a website and I’m having difficulty creating a "stopwatch". I need it to work this way: User recharges credit (EX: 4 real = 2 hours); Available times are: 1.2.3 hours;…
javascriptasked Luigi Azevedo 181