title: PHP echo not returning html code
body: <p>I'm running this within an html file (with a .php extension), yet when I inspect element, the iframe doesn't appear. Error reporting shows a problem with va5 and bind_param. When I call this php, I don't always have a variable5. How could I fix this?</p>
  
  <pre><code>&lt;?php
  
    $va1 = $_GET['variable1'];
    $va2 = $_GET['variable2'];
    $va3 = $_GET['variable3'];
    $redetails = NULL;
    $redetails2 = NULL;
    $redetails = $_GET['rdetails'];
    $redetails2 = $_GET['redetails2'];
  
    $stmt = $mysqli-&gt;prepare("SELECT id FROM idlist WHERE var1 = ? &amp;&amp; var2 = ? &amp;&amp; var3 = ? &amp;&amp; var4 = ? &amp;&amp; var5 = ?");
  
    //failing
    $stmt-&gt;bind_param('sssss', $va1, $va2, $va3, $va4, $va5);
  
    $stmt-&gt;execute();
    $result = $stmt-&gt;get_result();
  
    //failing
    echo $result[0];
  
    //failing
    echo '&lt;iframe src="https://drive.google.com/file/d/' . $result[0] . '/preview" width="850" height="1150"&gt;&lt;/iframe&gt;';
  ?&gt;
  </code></pre>