How do I execute a function after I click a button?
The code is as follows:
PHP Code
If you want to click the "Send Notification" button again, execute a PHP function (about the PHP socket).
------Solution--------------------
With Ajax, jquery Ajax is easy to use.
------Solution--------------------
It can only trigger the foreground event, PHP in the background, so you want to make the server execute the file by request.
------Solution--------------------
With Ajax.
or submit a form directly,
or submit the form to the IFRAME processing.
------Solution--------------------
discuss
Reference:
It can only trigger the foreground event, PHP in the background, so you want to make the server execute the file by request.
I mostly want to use a PHP socket, so I want to execute PHP functions. Can you implement sockets with Ajax?
------Solution--------------------
PHP Code