Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(stristr($_SERVER['REQUEST_URI'], 'config.php')){
- die("Wait a minute... who are yoooouuu? You're not allowed to come here.");
- }
- /* Database Credentials */
- $DatabaseHost = "localhost"; //Database host (use localhost or 127.0.0.1)
- $DatabaseUser = "root"; //Database username login (standard root)
- $DatabasePassword = "E4URMJ99RTR94!@#"; //Database password
- $DatabaseName = "Smoothboard Stylers"; //The database name (use "test" for test proposal, because test is always in a standard MySQL Database)
- /* Database Connection (PDO) */
- try {
- $DatabaseConnection = new PDO("mysql:host=$DatabaseHost;dbname=$DatabaseName", $DatabaseUser, $DatabasePassword);
- $DatabaseConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- //echo "Connectie succesvol gemaakt!"; //For test proposals, remove comment to see if connection is succesfull
- } catch(PDOexception $error) {
- echo "Connectie mislukt zie foutmelding: " . $error->getMessage();
- die();
- }
- $pdo->execute($f);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement