title: How to transfer multiple value in each textbox in PHP during formload
body: <p>I have a little  SQL Commands Here</p>
  
  <p>Databasename:Numbers</p>
  
  <pre><code>select * from tblstart where id = 1
  output = 10
  select * from tblstart where id = 2
  output = 20
  select * from tblstart where id = 3
  output = 30
  select * from tblstart where id = 4
  output = 40
  select * from tblstart where id = 5
  output = 50
  </code></pre>
  
  <p>How can i transfer this output in textbox during Page Load</p>
  
  <pre><code>&lt;input type="text" name="OutputOf10"&gt;&lt;br&gt;
  &lt;input type="text" name="OutputOf20"&gt;&lt;br&gt;
  &lt;input type="text" name="OutputOf30"&gt;&lt;br&gt;
  &lt;input type="text" name="OutputOf40"&gt;&lt;br&gt;
  &lt;input type="text" name="OutputOf50"&gt;&lt;br&gt;
  </code></pre>
  
  <p>Any help would be appreciated TY</p>
  
  <p>Here is the code so far but im getting errors</p>
  
  <p>Here is the php code(Updated)</p>
  
  <pre><code> &lt;?php 
  
  $host = 'localhost';
  $db_user = 'root';
  $db_pass = '';
  $db_name = 'poi';
  try {
    $pdo = new PDO('mysql:host='.$host.';dbname='.$db_name.'', $db_user, $db_pass);
    $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $stmt = $pdo-&gt;prepare('SELECT COUNT(name) FROM tblmarker WHERE name = (Robbery)');
    $stmt-&gt;execute(array('id'));
  
    $result = $stmt-&gt;fetchAll();
  
    if ( count($result) ) { 
      foreach($result as $row) {
        $OutputOf10 = $row['Name'];
        echo '&lt;input type="text" name="OutputOf10" value="'.$OutputOf10.'"&gt;&lt;br&gt;';
      }   
    } else {
      echo "No rows returned.";
    }
  } catch(PDOException $e) {
      echo 'ERROR: ' . $e-&gt;getMessage();
  }
  ?&gt;
  </code></pre>