Not getting the result
<p>I'm trying to connect to the database, but dont know what is the problem with this one. the code goes like this. Please help I'm very new to the php. :(
db_config.php</p>

<pre><code>&lt;?php define('DB_USER', "root");
      define('DB_PASSWORD', "database password");
      define('DB_DATABASE', "ews_app");
      define('DB_SERVER', "Im using the 'drupal' for webhosting should I give server address or localhost");
 ?&gt;
</code></pre>

<p><strong>db_connect.php</strong></p>

<pre><code>    &lt;?php

    class DB_CONNECT {

    function __construct() {
        $this-&gt;connect();
     echo "&lt;p&gt;server connected&lt;/p&gt;";
    }
    function __destruct() {
        $this-&gt;close();
    }
    function connect() {

        require_once __DIR__ . '/db_config.php';


        $con = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysql_error());


        $db = mysql_select_db(DB_DATABASE) or die(mysql_error()) or die(mysql_error());


        return $con;
    }

    function close() {

        mysql_close();
    }

}

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

<p>It should print server connected once it connect to the database. Are there any modification needed on it.</p>
