0
I have a little bit of code right below.
After the user clicks on a div whose ID is (click) this code will be executed. I have a PHP code that will be executed inside the javascript code block.I want to pass to the Javascript variable PHP (Value) in the method parameter $status->checkTipoUsuario(),getting $status->checkTipoUsuario(value). It is possible?
$('#click').click(function () {
var valor='exemplo';
var recebePHP= "<?php
$status= new Usuario_Control_Grupo();
$status->verificarTipoUsuario();
if($status==true) {
echo 'existe';
}else{echo 'inexistente';}
?>";
});
What you need is to perform an AJAX request. A only how Javascript and PHP communicate is by some communication protocol - the most common is HTTP. Search about this.
– Woss