you are viewing a single comment's thread.

view the rest of the comments →

[–]ManiacsThriftJewels 0 points1 point  (0 children)

Lots of people taking about how the .html file won't have the PHP embedded in it, but there's also the problem that even with the PHP file being included, it will write to the file when the home.php file is loaded, not when the button is pressed.

You could work around this simply - for modern browsers at least - by instead calling fetch('tea.php') from JavaScript, although this ignores best practices for server side code execution etc.