HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src= "jquery.js"></script>
<script type = "text/javascript" src = "script.js"></script>
</head>
<body>
<input id = "form1" type = "text">
<button id = "button1"></button>
<div id="div1"></div>
</body>
</html>
JS:
$(document).ready(function(){
$("#button1").click(function(){
var data = $("#form1").val();
$.post("php.php", data);
$("#div1").load("php.php");
})
})
PHP:
<?
$data = $_POST["data"];
echo $data;
?>
Описание проблемы - в шапке.