Run PHP function on html button click

前端 未结 6 1043
渐次进展
渐次进展 2021-01-31 00:43

I need to run some PHP function when a button is clicked. I know this is not supposed to be php\'s use, rather js should do it, but what my functions are doing in gathering data

6条回答
  •  醉酒成梦
    2021-01-31 01:26

    Use an AJAX Request on your PHP file, then display the result on your page, without any reloading.

    http://api.jquery.com/load/ This is a simple solution if you don't need any POST data.

提交回复
热议问题