I am creating a game and in that game to get coins you have to click a button but I do not know how to. What I thought first was to create a button in HTML then a PHP variable and make it so that when you click the button the variable value goes up by one and starts at zero. But I thought how do you control a HTML button with PHP.
Here is my code already made, MAKE SURE TO READ THE LINES OF COMMENTS IN THE CODE
<?php
    $coin = 0; //the variable that shows you your coins
    echo 'You have ' .$coin;
    echo <<<_END
        <img src="coin.png" width="2%" alt="coins">
    _END;
    echo <<<_END
    <button>More!</button> //button that makes your coins go up by one
    
    _END;
    
    ?>
Thanks, PHPcrazcode
