Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = myusername;
- $password = mypw;
- $host = "db4free.net:3306";
- $dbname = mydbname;
- $options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');
- try
- {
- $db = new PDO("mysql:host={$host};dbname={$dbname};charset=utf8", $username, $password, $options);
- }
- catch(PDOException $ex)
- {
- die("Failed to connect to the database: " . $ex->getMessage());
- }
- $host = "85.10.205.173:3306";
- $host = "db4free.net";
Add Comment
Please, Sign In to add comment