You’re using the wrong concatenator just after each of your PHP brackets ?>.
The dot (the concatenator for PHP) should be replaced with +
(the JavaScript concatenator) like this ?> +
.
$("#div1").load(
"http://ppp.gkdsjfgk.com/wp-content/themes/thestory/compare-form-site.php?loanamt=" +
<?php echo $_POST['loanAmt']; ?> + "&occupation=" +
<?php echo $_POST['occupation']; ?> + "&rateType=" +
<?php echo $_POST['rateType']; ?> + "&age=" +
<?php echo $_POST['age']; ?> + "&city=" +
<?php echo $_POST['city']; ?>
);
solved Syntax error while passing the values [closed]