This question already has an answer here:
- jQuery Ajax POST example with PHP 11 answers
I want to get the designation value to use it in my JS, but the PHP code does not work. How can I launch this query?
function updauting(clicked_id) {
<?php
$cat = $db->prepare("SELECT idCategory, category.designation FROM category WHERE category.idCategory = ?", clicked_id); "
?>
document.getElementById("category").value = $cat[0]->designation;
}
Aucun commentaire:
Enregistrer un commentaire