I created a script to read a hash (www.website.com/#hash) and pass the hash in to php.
The alert(hash)
pops up with the hash value, but the hash is not being echoed out in the post variable. Any idea why?
jQuery page
<script>
var hash = location.hash;
$.post("community.php", {
hash: hash
});
alert(hash);
</script>
Community.php page
<?php echo $_POST['hash']; ?>
Edits - $_GET below was originally $_POST above.
I have a foreach that is looping through postings (posting IDs) in a function. I need to pass the HASH into the function and compare it to the posting IDs everytime. Only problem is, the $_GET['hash'] will not show up inside the function.
function something() {
echo $_GET['hash'];
}