sample database connection helper
This commit is contained in:
commit
106ca96b9a
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
class DBHelper
|
||||
{
|
||||
private $servername = '';
|
||||
private $username = '';
|
||||
private $password = '';
|
||||
public function getDBConnection()
|
||||
{
|
||||
$pdo = new PDO("mysql:host=$this->servername;dbname=myDB", $this->username, $this->password);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue