Logic hook, php POST button not being detected

HiI’ve made a function and I want it to run with a logic hook but only if the ‘btn_newinvoiceno’ is clicked, but it’s not working.

if(isset($_POST[‘btn_newinvoiceno’])){
//Do something
}

It’s not working, any ideas why??