I'm very new to Javascript and AJAX so I'm using a script that I found, and I need it to send a PHP variable from the global variable (in the address bar where it says &post=94 for example) along with the other data that the script sends to a php script.

I've tried to add what I think should work but it clearly doesn't and I have no clue as how the variable would be used once it fetches the $_GET (if that is even allowed?).

Any help would be much appreciated, thanks!

The script looks like this:

$(document).ready(function() {
	$('a.delete').click(function(e) {
		var parent = $(this).parent();
[B]		var postID = $_GET['postID'];[/B]

			type: 'post',
			url: 'remove_row.php',
			data: 'ajax=1&delete=' + parent.attr('id').replace('record-','') + '&post=' +[B] postID[/B],
			beforeSend: function() {
			success: function() {
				parent.slideUp(300,function() {

If the javascript is already on a PHP page then you can just do

var postID = <?php echo $_GET['postID']; ?>

And keep the rest of your code the same.

i want to do the same thing but send the javascript variable to jsp page using post method.and save the data in data page without reloading