<form id="submit" method="post" action="#">
<button id="callFunc" type="button">Click Me</button>
echo "<table border='1'>";
echo "<tbody>";
foreach($dbr as $record) {
echo "<table border='1' style='position:relative; float:left;'>";
echo "<tbody>";
echo "<tr>";
echo "<td class='autocomplete' style='width:300px; background-color:#ddd;'>
Fournisseur:<div><input id='nom' type='text' placeholder='" . $record['Id'] . "'name='id' /></div>
Nom: <div><input id='Usager' type='text' placeholder='" . $record['IdBon'] . "'name='idBon' /></div>
Numéro bon de livraison: <div><input id='NumeroBonLivraison' type='text' placeholder='" . $record['Num'] . "'name='Num' /></div>
</td>";
echo "</tr>";
echo "<tr>";
echo "</tr>";
echo "</tbody>";
echo "</table>";
}
}
function modLivre() {
$args = array($id, $IdBon, $Num,);
$result = $MDO->query('EXEC ModLivre ?, ?, ?, $args);
<script type="text/javascript">
$(document).ready(function(){
$("#call").click(function(){
$.ajax({
url: 'db.php',
type: 'POST',
data: { Id : 'id', IdBon : 'idBon', Num : 'num',
},
success: function(modLivre) {
alert('qwdqw');
}
});
});
});
</script>
I need help on the ajax part how do you pass the $_POST value in the ajax so the modLivre function get the parameters?