Wednesday 6 November 2019

html - Detect click on via PHP




Is there a way to detect a click on a HTML button in PHP, or do I really need to put a form tag around the element and make it an input submit button.





OR







Thanks in advance.


Answer



PHP is a server-side language. If you'd like to tell a server-side script about clicks on HTML elements, you have to either submit the form or use AJAX.


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...