Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "mysqxxxx.premium";
- $username = "exxxntaxxx11";
- $password = "xxxxxx";
- try {
- $conn = new PDO("mysql:host=$servername;dbname=exxxntaxxx11;charset=utf8", $username, $password);
- // set the PDO error mode to exception
- $conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- echo "Connected successfully";
- }
- catch(PDOException $e)
- {
- echo "Connection failed: " . $e->getMessage();
- $conn = null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement