Warning: mysql_fetch_row() expects parameter 1
<p>I'm a new learner in PHP. I don't know what's my error with my code. Please help me fix this. :( Warning: mysql_fetch_row() expects parameter 1 to be resource, object given in C:\xampp\htdocs\project\employees.php on line 35.</p>

<pre><code>connection.php

&lt;?php

//print_r($_POST);

// DB Credentials
$servername = "localhost";
$dbusername = "root";
$dbpassword = "";
$dbname = "project101";

// Create connection
$con = mysqli_connect($servername, $dbusername, $dbpassword, $dbname);

// Check connection
if ( $con-&gt;connect_error ) {
    die("Connection failed: " . mysqli_connect_error());
}



?&gt;
</code></pre>

<p>Employee.php
    

<pre><code>include ('connection.php');
if(empty($_SESSION)) // if the session not yet started 
   session_start();

if(!isset($_SESSION['username'])) { //if not yet logged in
   header("Location: index.php");// send to login page
   exit;
} 
?&gt;

&lt;html&gt;
&lt;head&gt;

&lt;title&gt;Employee&lt;/title&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;center&gt;

&lt;div id="body"&gt;
 &lt;div id="content"&gt;
    &lt;table align="center"&gt;
    &lt;tr&gt;
    &lt;th colspan="5"&gt;&lt;a href="add.php"&gt;add data here.&lt;/a&gt;&lt;/th&gt;
    &lt;/tr&gt;
    &lt;th&gt;First Name&lt;/th&gt;
    &lt;th&gt;Last Name&lt;/th&gt;
    &lt;th&gt;Email&lt;/th&gt;
    &lt;th colspan="2"&gt;Action&lt;/th&gt;
    &lt;/tr&gt;
    &lt;?php
 $result2 = $con-&gt;query("Select * from `employee`");
 while($row=mysql_fetch_row($result2))
 {
  ?&gt;
        &lt;tr&gt;
        &lt;td&gt;&lt;?php echo $row[1]; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row[2]; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row[3]; ?&gt;&lt;/td&gt;
  &lt;td align="center"&gt;&lt;a href="javascript:edt_id('&lt;?php echo $row[0]; ?&gt;')"&gt;&lt;img src="b_edit.png" align="EDIT" /&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td align="center"&gt;&lt;a href="javascript:delete_id('&lt;?php echo $row[0]; ?&gt;')"&gt;&lt;img src="b_drop.png" align="DELETE" /&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;?php
 }
 ?&gt;
    &lt;/table&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>