javascript for setting PHP session variable without reloading the page and toggles the value of the button