PHP MySQL expects mysqli boolean given

前端 未结 5 969
一向
一向 2021-01-29 07:38

I have a php script that changes a database when the page is requested. Here is the php:



        
5条回答
  •  耶瑟儿~
    2021-01-29 08:38

    $con=mysqli_connect("server","db","user","password");//establish connection
    

    you need to define those variables

    DEFINE('SERVER', 'localhost');
    
    DEFINE('db','whatever');
    
    DEFINE('user','nickcage');
    
    DEFINE('password','conair');
    

提交回复
热议问题