Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class connection{
- private $dns;
- private $user;
- private $password;
- function __construct()
- {
- $this->dns = "mysql:host=localhost;dbname=cadastro";
- $this->user = "root";
- $this->password = "";
- $connection = new PDO($this->dns,$this->user,$this->password);
- $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement