title: Display data from mysql/phpmyadmin on html page
body: <p>I'm a beginner in <code>PHP</code>.
  I have tried to put PHP in HTML file in order to call data from my database called test and the table called myemployee.<br>
  I tried all the recommendation from other forum but I still did not get the display in table, instead, the code was displayed.<br>
  Following my code. Is there something wrong in my code?</p>
  
  <p>Even if I put in PHP file and then, call from HTML file like this <code>&lt;?php include ('test.php')?&gt;</code> it still didn't work.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;title&gt;Home&lt;/title&gt;
  &lt;link href="style/index-layout.css" rel="stylesheet" type="text/css" /&gt;
  &lt;link href="style/homepage-layout.css" rel="stylesheet" type="text/css"/&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;!--right--&gt;
  &lt;div id="body"&gt;
  &lt;div id="left"&gt;
  
  &lt;br /&gt;&lt;br /&gt;
  &lt;P &gt;&lt;B&gt;&lt;h3&gt;Progress&lt;/h3&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
  
  &lt;/div&gt;&lt;/div&gt;
  &lt;?php
        $username = "root";
        $password = "";
        $host = "localhost";
  
        $connector = mysql_connect($host,$username,$password)
            or die("Unable to connect");
          echo "Connections are made successfully::";
        $selected = mysql_select_db("test", $connector)
          or die("Unable to connect");
  
        //execute the SQL query and return records
        $result = mysql_query("SELECT * FROM myemployee");
        ?&gt;
  &lt;table&gt;
        &lt;thead&gt;
          &lt;tr&gt;
            &lt;th&gt;Employee_id&lt;/th&gt;
            &lt;th&gt;Employee_Name&lt;/th&gt;
            &lt;th&gt;Employee_dob&lt;/th&gt;
            &lt;th&gt;Employee_Adress&lt;/th&gt;
            &lt;th&gt;Employee_dept&lt;/th&gt;
            &lt;th&gt;Employee_salary&lt;/th&gt;
          &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
          &lt;?php
            while( $row = mysql_fetch_assoc( $result ) ){
              echo "$row";
              echo
              "&lt;tr&gt;
                &lt;td&gt;{$row['employee_id']}&lt;/td&gt;
                &lt;td&gt;{$row['employee_name']}&lt;/td&gt;
                &lt;td&gt;{$row['employee_dob']}&lt;/td&gt;
                &lt;td&gt;{$row['employee_addr']}&lt;/td&gt;
                &lt;td&gt;{$row['employee_dept']}&lt;/td&gt;
                &lt;td&gt;{$row['employee_sal']}&lt;/td&gt; 
              &lt;/tr&gt;";
            }
          ?&gt;
        &lt;/tbody&gt;
      &lt;/table&gt;
       &lt;?php mysql_close($connector); ?&gt;
  &lt;br/&gt;&lt;br/&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>