0
Hello
I have a table
<table>
<thead>
<th>Codigo</th>
<th>Nome</th>
</thead>
<tr>`insira o código aqui`
<td>1</td>
<td>Carlos</td>
</tr>
<tr>
<td>2</td>
<td>Charles</td>
</tr>
<tr>
<td>3</td>
<td>José</td>
</tr>
</table>
I wonder if there is how to "take" this data and send to php can be via json or even javascript
I tried to use that:
var dadosDataTabela = [];
function verificarTabela() {
$('.item').each(function () {
var todos_itens = {
codigo : $(this).children()[0].innerText,
nome : $(this).children()[1].innerHTML,
};
dadosDataTabela.push(todos_itens);
});
}
and to send JSON.stringify(dadosDataTabela),
But I have not yet succeeded as you receive in php. To then send this data to the database
If you are using jQuery, there is a library for this: http://jsfiddle.net/cCzqn/80/
– MarceloBoni