How to fix Warning: mysql_fetch_array() expects parameter 1

Hello friends if you have facing some like How to fix Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given ?

How to solve this this error?

You must need to resolve this problem from two ways:

First Step : You need to Create Connection

friend you need to check first config.php file like connection from your php file

<?php
 $con=mysqli_connect("localhost","username","","database_name");
?>

Second Step : if You are insert / update data

<?php
    include"config.php";
    $result=mysqli_query($con,"insert or update sql query goes here ");
?>

 Third Step : if You are select

<?php
    include"config.php";
    $result=mysqli_query($con,"select sql query goes here ");
    $row=mysqli_fetch_array($result);
?>

 Fourth Step : Check your query

You need to check you query right now

<?php
    include"config.php";
    $result=mysqli_query($con,"select sql query goes here ") or ("Error:". mysqli_error($con));
    $row=mysqli_fetch_array($result);
?>

 

i hope your error is gone so keep learning at skill never end