Can anyone help me with adding a button on html?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Can anyone help me with adding a button on html?

      I want a button that does a function, I've written this in the html file:

      HTML Source Code

      1. <div id="submit" style="width: 100%;float: left;">
      2. <form method="post">
      3. <input value="Buy" type="submit">
      4. </form>
      5. </div>


      And a function in the PHP file:


      PHP Source Code

      1. function submit()
      2. {
      3. $SQL = "INSERT INTO ".USERS." SET `atm` ='1000';";
      4. $GLOBALS['DATABASE']->query($SQL);
      5. }
      What else do I have to manage it to launch this PHP function when I click the button?