MySQL connection class I am trying to learn OOP using PHP5 and I wrote a simple MySQL connection class. Please take a look and give me some feedback on better practices, critical errors, and any other feedback you can provide.

Note: in the verifyDatabaseConnection method, I used an @ symbol to curb the error I was receiving.

&lt;?php
class Mysql
{
        private $user;
        private $pass;
        private $data;
        private $host;

        public function __construct($user,$pass,$data,$host)
        {
                $this-&gt;user = $user;
                $this-&gt;pass = $pass;
                $this-&gt;data = $data;
                $this-&gt;host = $host;
                $this-&gt;verifyNullFields();
        }
        private function verifyNullFields()
        {
                if($this-&gt;user == NULL)
                {
                        print('mysql error : username is null');
                }
                if($this-&gt;data == NULL)
                {
                        print('mysql error : database name is null');
                }
                else if($this-&gt;host == NULL)
                {
                        print('mysql error : host name is null');
                }
                else
                {
                        $this-&gt;verifyDatabaseConnection();
                }
        }
        private function verifyDatabaseConnection()
        {

                $link = @mysql_connect($this-&gt;host,$this-&gt;user,$this-&gt;pass);
                if(!$link)
                {
                        die('mysql error : databse connection issue');
                }
                else
                {
                        $this-&gt;verifyDatabaseExist();
                }
        }
        private function verifyDatabaseExist()
        {
                $db = mysql_select_db($this-&gt;data);
                if(!$db)
                {
                        die('mysql error : database selection issue');
                }
        }

}
?&gt;

&lt;?php
$m = new Mysql("root","","test","localhost");
 ?&gt;
Don't print anything or call die() from this class because it may breaks caller's code/page. For example, you may want to show customized error page when error occurs, but all text printed by your code will break and stops this. One point is return boolean, as already said. But I personally prefer using exceptions for that (and even more -- I create special excepton which extends standard Exception class. This approach allows to differentiate one exception from another.).
Get rid of chained method calls. Don't call verifyDatabaseConnection() from verifyNullFields(), verifyDatabaseExist() from verifyDatabaseConnection() and so on. Your method should do only one thing as declared in their name.
Rename data member to something more meaningful.
At your opinion: you may replace $this-&gt;user == NULL) check to is_null($this-&gt;user)
Also, when you will need to create similar class for PostgreSQL database (or abother DB) you should extract base class