note 114951 deleted from function.mysqli-connect by cmb

From: Date: Thu, 20 Aug 2015 00:47:22 +0000
Subject: note 114951 deleted from function.mysqli-connect by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-203399@lists.php.net to get a copy of this message
Note Submitter: dev dot render at gmail dot com ---- <?php //---abstracted ! ------ class connection{ public $host ="yourHostIp"; public $user = "UserName"; public $password = "password"; public $db="yourDatabase"; public $dbc; function __construct() { $con = mysqli_connect($this->host, $this->user, $this->password, $this->db); if(mysqli_errno($con)){ echo"sum error"; } else{ $this->dbc = $con; // assign $con to $dbc echo"connected "; } } } $test = new connection(); ?>

« previous php.notes (#203399) next »