Posts by Solange • 309 points
18 posts
-
1
votes1
answer396
viewsA: Pass PHP variable to another page using Ajax, and update value of an element
If the function gerar_reportario_extract() is being called inside the extract.php can do the following: - put a span or div with id - where the value will be placed with innerHTML: <div…
-
3
votes2
answers399
viewsA: Remove the last comma from an array of a While
If I understand correctly your problem is only to delete a comma at the end of the string if that’s all you try: rtrim($number_Aut,',') But by your code I believe you have to take out the ' too,…
-
0
votes1
answer59
views -
0
votes1
answer476
viewsA: UPDATE with AJAX
The problem in your queries refers to quotes, will work if you exchange your updates as follows in the separation query: $sql = "UPDATE pedidos SET status = 'Em separação' WHERE id='$checkStatus' ";…
-
0
votes1
answer614
viewsA: Get PK from one table and Insert as FK into another
Try to do the following after executing the select query, to recover the field you want from select: $res_idpessoa = $banco->query($sql); $dados = $res_idpessoa->fetch_array(); and on the…
-
0
votes2
answers684
viewsA: Pass input values to PHP
I would do with javascript this way passing by putting the onchange in the input: <input type="text" class="form-control col-md-7 col-xs-12 decimal" name="entrada" id="entrada" value="0"…
-
0
votes1
answer599
viewsA: Javascript function does not work after Else if
Change your ready() function to as follows, because using $("#option1") will always enter the first if, it is returning objects even after the remove. function ready(){…
-
0
votes2
answers117
viewsA: Explode and compare value in a Select?
I believe this is what you want: SELECT SUBSTRING_INDEX($data_id, '-', 1)
-
0
votes1
answer52
viewsA: Vector sum doubt and bank recording
Good by what is in your code today the function clones the quantity field within the form, to be included several different values in this field, it does not make much sense that having several…
-
1
votes1
answer38
viewsA: When entering, value is incorrect
If the final date field is being filled with date in the format 20/05/2017 then the problem is no date('Y-m-d H:i:s', $datahora_final) do so: $datahora_final_sem_formatar = $_POST['datahora_final'];…
-
1
votes1
answer70
viewsA: Duplication of PHP data
You can put lock on button not to allow double click: <button type="button" class="btn btn-success" onclick="this.disabled=true;this.form.submit();" >Enviar</button> and also validate if…
-
0
votes1
answer39
viewsA: Doubt Mysql + PHP
If I understood correctly you want to make a select field in html with the values of the database, if that would be so, where the value of the options would be the id for you to recover by post or…
-
1
votes1
answer459
viewsA: Form Post with Dynamic Fields
You can pass the product id in the name this way: <input type="text" name="txtQuantidade<?php echo $id_produto; ?>" value="<?php echo $quantidade; ?>"> and post the form,…
-
0
votes2
answers704
viewsA: Pass GET method by Jquery
From what I understand you want to pass the link href by jquery, if it is that follows below the problem is to serialize: <?php echo '<a id="consulta"…
-
0
votes2
answers97
viewsA: Form system by base date how to pick up data in $_POST
I tested your code with update follows how it would look to work: <code> <?php require_once('Connections/localhost.php'); if (isset($_POST['acao'])) { if (isset($_POST['nome'])) {…
-
1
votes1
answer45
viewsA: Bring all necessary results in a query - Mariadb
Not to repeat the test information 2 (I did not test but I believe it will solve) add distinct ex: group_concat(distinct t2.teste2 SEPARATOR '&')
-
0
votes1
answer91
viewsA: How do I pass the COUNT attribute in my sql string, since "COUNT" is a reserved php word?
The count(*) is inside the string, so no problem, to get its value and be more readable too, I suggest assigning an alias to it ex: select count(*) as total from ...
-
0
votes2
answers81
viewsA: DO NOT show Alert messeger when reloading the page
Well, I don’t know how you are doing this reload, but if it is automatic by the system, send via get passing url, I had this problem with the user giving F5 to reload the page, to solve Validei if…