Execute PHP function on button click
Execute PHP function on button click
janosh0610
Posts: 1Questions: 1Answers: 0
Hi
I would like ask if it is possible to execute a server-side PHP custom function by clicking custom button on client side?
If yes, could you provide code snippet?
In my case, the PHP function would do some sql inserts and updates, and then the datatable should get updated with the new values.
Best regards and many thanks!
Janosh
This discussion has been closed.
Answers
Its certainly possible - have the button's click event listener call
$.ajax()
to make a call to the server, and specifically the PHP script you want to execute.Allan