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