title: Success or Failed message not displaying after PHP script execution for database connection
body: <p>This is constant.php script. As usual I am getting a "Successful or Failed" message for connection. Also it is not outputting any error message. please do tell in the comments). </p>
  
  <pre><code>&lt;?php
  define("HOST","localhost");
  define("USER","root");
  define("PASS","");
  define("DB","project_inv");
  define("DOMAIN","http://localhost/inv_project/public_html");
  ?&gt;
  </code></pre>
  
  <p>This db.php script,after executing script it doesn't show success or failed message.</p>
  
  <pre><code>class Database
  {
  
      private $conn;
  
      public function connect()
      {
          include_once("constants.php");
          $this-&gt;conn = new mysqli(HOST,USER,PASS,DB);
  
          if ($this-&gt;conn) {
  
           echo "connected";
           // return $this-&gt;conn;
          }else{
  
              return "Database Connection Faild";
          }
  
  
      }
  }
  </code></pre>