Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*** mysql hostname ***/
- $hostname = 'localhost';
- /*** mysql username ***/
- $username = 'root';
- /*** mysql password ***/
- $password = '';
- try {
- $db = new PDO("mysql:host=$hostname;dbname=test", $username, $password);
- /*** echo a message saying we have connected ***/
- }
- catch(PDOException $e)
- {
- echo $e->getMessage();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement