0
I have the following function being called by onclick, the problem is that I can’t use Javascript variable in php, someone has an idea of how to do this function?
Function fila(id){
var idBanco = id;
console.log(variaveljs);
<?php
$sql = "UPDATE `tabelaclientespos` SET `empresa` = '2' WHERE
`tabelaclientespos`.`Id` = idBanco";
mysqli_query($conn,$sqlTempo);
?>
}
Other: Pass php variable to javascript
– Woss
How to pass variables between PHP pages via Javascript?
– Woss
Update a PHP variable inside Javascript in a time interval
– Woss
If none of these suit you, please edit your question and clarify the problem better.
– Woss