Ajax Request

ajax.html

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script>
var nat_resume_serives = {nat_price: 2000,nat_cover_letter: 200, nat_faster_del: 50, nat_addon_0: 12};
$.ajax({
type: 'POST',
url: 'result.php',
data: nat_resume_serives,
dataType: 'json',
success: function(result){
console.log(result);
},
error: function(error)
{
alert('Oops! Something went wrong!!!');
console.log(error);
}

});
</script>

result.php

<?php
/// php operation
echo $_POST['nat_price'];
?> ...  Read More

Share This: