Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $hostname = 'localhost';
- $username = 'root';
- $password = '';
- $database = 'calendario';
- try {
- $conexao = new PDO("mysql:host=$hostname;dbname=$database", $username, $password,
- array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
- //echo 'Conexao efetuada com sucesso!';
- }
- catch(PDOException $e)
- {
- echo $e->getMessage();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement