Hi All,
I really hope someone can help as I'm having a tough time trying to sort this.
I've the following script in my header.php file:
Code:
$(document).ready(function(){      
	$.ajaxSetup({cache:false});     
	$(".locationID").click(function(){         
		var post_id = $(this).attr("rel"); 
		//alert($(this).attr('rel'));
		$("#single-home-container").html("loading...");         
		$("#single-home-container").html(post_id);
		//$("#single-home-container").text(post_id);

		$.post("footer.php", {"locationID": post_id});

		return false;    
	});  
});
It passes the value I need into this div in my footer.php file:
Code:
<div id="single-home-container"></div>
However, I really need to get the value and pass it into a php variable so I can use it in a mysql query. So I've got this:
Code:
<?php 
$locID = $_POST['locationID']; 
echo 'Result: '.$locID;
?>
But it simply wont get the value. Any help is much appreciated!