This is the Ajax code
$('#FormEs').submit(function(e){
e.preventDefault();
$.ajax({
url: "VerificarPerson.php",
type: "POST",
dataType:"html",
data: {
'metodo': $('#metodo').val(),
'idp': $('#idp').val(),
'personName': $('#personName').val()
}
}).done(function(data){
alert(data); // <------------------------------------------------
});
});
and This is PHP
<?php
if(strcasecmp('Teste', $_POST['metodo']) == 0){
$html1 = $_POST['personName'];
$html2 = $_POST['personName2'];
echo $html1; /
}
?>
Well I wanted to show the two variables type alert('html1')
and then alert('html2')
type does anyone know how?