I have `<span id="count"></span>`
which is basically changing its value on click.

Part of my javascript code is 

```
$( document ).ready(function() {

  $('#stars').on('starrr:change', function(e, value){
    $('#count').html(value);
  });      

});

```

**How to store the value of id count in a variable in php.**

I tried:

```
<?php $var = ?><span id="count"></span><?php ; ?>

```

But I am getting error.

I cant store it in hidden field because its value changing on click.

**Is there a way such that When I click a "Post" button whatever the value of #count it get stored it in php variable so I can insert into database.**

Thanks.