Accessing JSON data object via PHP script
Hey guys,
I've got the following code:
- var data = {
person: '<?php echo 'test'; ?>'
};
$.get( '/scripts/script.template.php?id=1', data, processResponse );
I was just wondering how will I be able to access the content of the data variable in
script.template.php?
The other problem is that when I use the $.getJSON method (instead of just $.get), the script doesn't appear to get called. Any ideas why?
Much thanks!
Bardi