+ 4
Need help with php functions
I want a function to be called when someone click a button but because html follows client side and php server side scripting so it is not possible to use it directly is there any other way to do it except using js ajax method . If no please elaborately define ajax method as I don't want to use something I don't understand.
2 Respostas
+ 4
You could use WebSockets (which I would not recommend because it’s quite advanced) or AJAX. Google up AJAX, and you should find loads of helpful tutorials online.
+ 1
You cannot call server side functions from client side without the use of JavaScript or Jquery and Ajax. Because php functions execute in server side.
https://stackoverflow.com/questions/5967322/calling-a-php-function-from-an-html-form-in-the-same-file