Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $username = "root";
- $password = "";
- $db = "latihan";
- try{
- $conn = new PDO("mysql:host=$host;dbname=$db",$username, $password);
- $conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
- }
- catch(PDOException $e){
- echo "Connection failed: ".$e->getMessage();
- }
- ?>
Add Comment
Please, Sign In to add comment