-
-
Save exileed/13df47a330fdaa544839b64f7aab3e6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include ('Connect.php'); | |
$test = new Connect; | |
$test->createUser(); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Connect { | |
private $connection; | |
public function __construct(){ | |
$this->connect(); | |
} | |
public function connect(){ | |
$this->connection = new PDO('mysql:host=orfarile;dbname=orfarile', 'root', ''); | |
} | |
function selectTests(){ | |
} | |
public function createUser(){ | |
$this->connection->query("INSERT INTO users(user_login, user_password) VALUES ('test1', 'test1')"); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment