0
I have this code plus ajax doesn’t even carry a value
$.ajax({
url: 'php/vizCliente.class.php',
type: 'POST',
data: {
update: '1'
},
cache: false,
datatype: "json",
error: function(e) {
alert('Erro ao tentar ação! \n'+e);
},
success: function(data) {
alert(data);
},
});
});
This is the code in php
final class vizCliente
{
public $update;
public function __construct()
{
$this->update = $_POST['update'];
if($this->update == '1')
{
echo $this->update;
}
}
}
And how you did the class instance in PHP?
– Woss