<html>
<head>
<link rel="stylesheet" href="css/jquery-ui.css">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#from").datepicker();
$("#to").datepicker();
var from=$("#from").val();
var to=$("#to").val();
$("#btn").click(function() {
$("#datecheck").load("date2.php",{from:from,to:to},function(res){});
});
});
</script>
</head>
<body>
<form action="#" method="post">
From:<input type="text" id="from" name="from"/>
To: <input type="text" id="to" name="to"/>
<input type="button" value="submit" id="btn"/>
</form>
<div id="datecheck"></div>
</body>
</html>
//php code
$from=$_POST['from'];
echo $from;
i am not getting the date value when i echoed in the same page.
please any help.
thanks in advance.