title: How to mix PHP in HTML file
body: <p>When I use iframe in HTML file that linked to test.php .. the result is OK</p>
  
  <p>Test.php :</p>
  
  <pre><code>&lt;?php     
     $host = "localhost";
     $user = "user";
     $pass = "pass";
     $database = "db";
     $koneksi = mysql_connect ($host,$user,$pass);
  
     mysql_select_db($database,$koneksi) or die ("error");
  
     $result = mysql_query("SELECT * FROM pengumuman"); 
     $i = 0;
  
     while($row = mysql_fetch_array($result)) { 
          echo "&lt;li&gt;&lt;a href='#'&gt;".$row['judul']."&lt;/a&gt;&lt;/li&gt;";
          $i++;
     } 
  
     mysql_close($koneksi); 
  ?&gt;
  </code></pre>
  
  <p>But I do want to separate this test.php, so I mixed it in  my HTML file</p>
  
  <pre><code>&lt;?php 
     $host = "localhost";
     $user = "user";
     $pass = "pass";
     $database = "db";
     $koneksi = mysql_connect ($host,$user,$pass);
  
     mysql_select_db($database,$koneksi) or die ("error");
  
     $result = mysql_query("SELECT * FROM pengumuman"); 
     $i = 0;
  
     while($row = mysql_fetch_array($result)) { 
  ?&gt; 
     &lt;li&gt;&lt;a href='#'&gt;&lt;?php $row['judul'] ?&gt; &lt;/a&gt;&lt;/li&gt;
  
  &lt;?php 
          $i++;
     }   
      mysql_close($koneksi); 
  ?&gt;
  </code></pre>
  
  <p>And the result not OK anymore!
  Truly, I'm new in web prog .. Can anyone help me ?</p>