title: PHP Code with HTML
body: <p>I am creating a simple MVC site that uses CRUD. For the delete function I have a button, the code below is what I am trying to use to send the rowID to the controller to handle. </p>
  
  <p>I am having trouble in that the code doesnt print out on the screen correctly, The php code is being printed as well as the button. </p>
  
  <p>The rowID isnt being passed either and I am wondering if my approach with the php code is the correct way?</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>&lt;?php
  $itemsDAO = new ItemsDAO();
  $result=$itemsDAO-&gt;getItems();
  foreach ( $result as $row )  {
      $uid = $row['id'];
      var_dump($uid);
  ?&gt;
  &lt;form action="index.php" method="post"&gt;
  &lt;fieldset&gt;
  &lt;input id='action' type='hidden' name='action' value='deleteItem' /&gt;
  &lt;p&gt;
  &lt;div class="form-group"&gt;
      &lt;div class="controls"&gt;
          &lt;input type="hidden" id="fId" name="fId" value="&lt;?php echo $uid; ?&gt;"&gt;
          &lt;input type="submit" class="btn btn-success" value="Delete"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/p&gt;
  &lt;/fieldset&gt;
   &lt;/form&gt;
  
   &lt;?php } ?&gt;
  </code></pre>
  
  <p><strong>Delete Function</strong></p>
  
  <pre><code>    public function getItems () {
      $sqlQuery = "SELECT *";
      $sqlQuery .= " FROM items";
  
      $result = $this-&gt;getDbManager()-&gt;executeSelectQuery($sqlQuery );
      return $result;
  
  }
  </code></pre>