Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class dbConnect {
- private $username = "root";
- private $password = "";
- public function __construct($username, $password) {
- $this->username = $username;
- $this->password = $password;
- }
- public function connect($username, $password) {
- $conn = new PDO('mysql:host=localhost;dbname=sequencemtg', $username, $password);
- }
- }
- $username = "root";
- $password = "";
- $conn = new PDO('mysql:host=localhost;dbname=sequencemtg', $username, $password);
- $test = new dbConnect($username, $password);
- $test->connect($username, $password);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement