title: How load data from mySql in an HTML button?
body: <p>I want to load data from my MySql database and put one field of this database into the text of a button :</p>
  
  <pre><code>&lt;?php
    $servername = "localhost";
    $username   = "prova";
    $password   = "";
    $dbname     = "prova";
  
    // Create connection
    $conn = new mysqli($servername, $username, $password, $dbname);
    // Check connection
    if ($conn-&gt;connect_error) {
        die("Connection failed: " . $conn-&gt;connect_error);
    }
  
    $sql    = "SELECT nomeCantiere,codiceCommessa,indirizzoCantiere FROM Cantiere";
    $result = $conn-&gt;query($sql);
  
    if ($result-&gt;num_rows &gt; 0) {
        // output data of each row
        while ($row = $result-&gt;fetch_assoc()) {
            echo "nomeCantiere: " . $row["nomeCantiere"] . " - codieCommessa: " . $row["codieCommessa"] . " - indirizzoCantiere" . $row["indirizzoCantiere"] . "&lt;br&gt;";
        }
    } else {
        echo "0 results";
    }
    $conn-&gt;close();
  ?&gt;
  &lt;input type="button" value="button" /&gt;
  </code></pre>
  
  <p>I'm a beginner with this type of programming.</p>
  
  <p>For now I have managed to do is generate a simple <code>"echo"</code>.</p>
  
  <p>How can I automatically generate buttons with a <code>value="nomeCantiere"</code>?</p>