Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style type="text/css">
- #wrapper {
- width: 900px;
- font-family: Helvetica;
- margin: 0 auto;
- }
- </style>
- </head>
- <body>
- <section id="wrapper">
- <?php
- $username = "root";
- $password = "root";
- $hostname = "localhost";
- //connection to the database
- try {
- $dbh = new PDO('mysql:host=localhost;dbname=foreningsstart', $user, $pass);
- foreach($dbh->query('SELECT * from PROJECTS') as $row) {
- print_r($row);
- }
- $dbh = null;
- catch (PDOException $e) {
- print "Error!: " . $e->getMessage() . "<br/>";
- die();
- }
- ?>
- <article class="post">
- </article>
- </section>
- </body>
- </html>
Add Comment
Please, Sign In to add comment