Posts by gabriel.pelegrina • 89 points
8 posts
-
1
votes1
answer74
viewsA: Separate return from a table to a Timeline
First search the dates with records: SELECT distinct data_timeline //converter o timestamp para data (dd/mm/yyy ou outro formato apenas de dada) WHERE para_timeline =…
-
1
votes2
answers145
viewsA: Create array with AJAX and send to another PHP page
Jquery $.post('paginaQueRecebeMusicas.php', $('#meu-form').serialize(), function(data){ //callback - Executa algo apos finalizar o envio. Ex. limpar o form )}; HTML <form id="#meu-form">…
-
0
votes2
answers216
viewsA: How to know one HTTP_HOST and redirect to another
One way is to do it like this: if(in_array($_SERVER['HTTP_HOST'], ['site1.com', 'site2.com'])){ //verifica se o valor do HTTP_HOST é um dos sites passados header('Location: novosite.com'); die(); }…
-
0
votes1
answer161
viewsA: Array within Array
Try to do it that way: $data = '[{"nome": "Edileuza", "CPF": "009876543-00"},{"nome": "Cleuza","CPF": "123456789-00"}]'; $data = json_decode($data, true); $novos_dados = []; //ou array(); dependendo…
-
1
votes2
answers63
viewsA: Error inserting data into BD with PHP
Try separating the classes, interfaces and files that receive form data into separate files. Ex: Archive: cadastroUsuario.php interface cadastroUsuario { //codigo da interface } user file.php…
-
3
votes1
answer159
viewsA: How to pick up a value via GET and others via POST at the same time?
You can try it like this: <form action="minhaacao.php?id=<?php echo $_GET['id']?>" method="post"> <!-- demais inputs --> </form>
phpanswered gabriel.pelegrina 89 -
-1
votes2
answers585
viewsA: Compare current record with previous record in loop/loop
Try the example below: //$array são todos os resultados da query ($result->fetch_all() ) if(count($array) > 1) { //verifica se existem mais de 1 item no array foreach ($array as $key =>…
-
0
votes1
answer67
viewsA: Update Listview item after Callback
Try to use View v = suaListView.getChildAt(position); TextView textView = (TextView) v.findViewById(R.id.idSuaTextView); textView.setText(parseObject.getString("name"); or use Recyclerview and…