Hi I am a little new to web programming and I ran into a problem with the $.post function.

right now I have some images in my index page and when I click on them I want to:

1) go to a second page called viewAlbum

2) get the source of the clicked image and store it in a `$_SESSION['album']` located in the viewAlbum.php page.

index.php:

```
<a href = \"viewAlbum.php\"><img src = " . $url . " alt = " . $caption . " title = " . $caption . "/></a>

(caption is a string)

script.js:

$('img').click(function(){
        if(window.location == index){
            console.log("1");
            var src = $(this).attr("src");
            var data = {"Album": src};
        }
}

viewAlbum.php:

<?php
if(isset($_POST['Album'])){ 
    print("worked>");
    $_SESSION['album'] = $_POST['Album'];
}
else{ 
print("did not work");
}

?>

```

This is printing "did not work" and I do not know how to fix it. Please help!