1Button clicks are client side whereas PHP is executed server side, but you can achieve this by using Ajax:
2
3$('.button').click(function() {
4 $.ajax({
5 type: "POST",
6 url: "some.php",
7 data: { name: "John" }
8 }).done(function( msg ) {
9 alert( "Data Saved: " + msg );
10 });
11});
12In your PHP file:
13
14<?php
15 function abc($name){
16 // Your code here
17 }
18?>