aunque no lo creas tu mismo te respondiste
Código Javascript
:
Ver original$("#formcontract").submit(function(e) {
var url = "autorizar.php"; // the script where you handle the form input.
$.ajax({
type: "POST",
url: url,
data: $("#formcontract").serialize(), // serializes the form's elements.
success: function(data)
{
$("#respuesta").html(data);; // aqui cargamos la respuesta en un div vacion cuya id es respuesta
}
});
e.preventDefault(); // avoid to execute the actual submit of the form.
});
en tu php
Código PHP:
Ver original//luego de las querys y todo es, imprimimos el resultado desde aqui
echo "<div class='alert alert-success'><strong>EXITO!</strong> AQUI VA EL RESULTADO DE LA CONSULTA DE PHP</div>";
asi de simple, saludos