-1

i am getting errors-

  1. Notice: Undefined variable: conn in (file location).
  2. Warning: mysqli_query() expects parameter 1 to be mysqli, null given in
  3. Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in

whats wrong i am doing in these statement?

include "config.php";

//used for check menu existance in menu table
function check_menu_exist($desname){

$qu =mysqli_query($conn,"SELECT * FROM menu WHERE menu_name='$desname'");

    if (mysqli_num_rows($qu)>0)
    {
      return true;
    }
    else {
        return false;
    }
}
Alive to die - Anant
  • 70,531
  • 10
  • 51
  • 98
Beauty akter
  • 331
  • 1
  • 2
  • 8

1 Answers1

0

i have found solution. all i did is i have include the include file inside of function. thanks everyone for no answer of my question.

Beauty akter
  • 331
  • 1
  • 2
  • 8