I'm coding a form right now using jQuery .post and the file responsible for processing has the code:
print_r($_POST);
Which returns the following dynamic output:
Array ( [data] => capacity=50-1000+people&bookingdate=17%2F04%2F2012&grade=1+star )
I am trying to split up this array into three variables namely capacity, booking date and grade but don't really know how to. Any idea how? I've tried using echo $_POST["capacity"]; but it doesn't work.
Thanks in advance!
Edit
This is the jQuery I'm using:
<script type="text/javascript">
$(document).ready(function() {
$("#postData").click(function() {
$("#last-step").hide(600);
$.post('resources/process2.php', { data: $("#task5_booking").serialize() }, function(data) {
$("#result").html(data);
});
return false;
});
});
</script>
which is working with the following form: