Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dbName = "servatrice";
- $dbHost = "localhost";
- $dbUser = "servatrice";
- $dbPass = "<password>";
- $dbConnect = new PDO("mysql:dbname=$dbName;host=$dbHost;charset=utf8",$dbUser,$dbPass);
- $dbConnect->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); // Enable emulated, prepared statements. Note - false means we will try to use NATIVE prepared statements, but will fall back on emulation.
- $dbConnect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Set errors to display if PDO fails.
- ?>
Advertisement
Add Comment
Please, Sign In to add comment