Advertisement
Guest User

Untitled

a guest
Jan 27th, 2013
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.21 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4.     <title></title>
  5. </head>
  6. <body>
  7.     <table>
  8.         <thead>
  9.             <tr>
  10.                 <td>Naam</td>
  11.                 <td>Gemeente</td>
  12.                 <td>Datum</td>
  13.             </tr>
  14.         </thead>
  15.         <tbody>
  16.        <?php
  17.  
  18. $user = "your DB user here";
  19. $password = "your DB pass here";
  20.  
  21. $db = mysql_connect('localhost', $user, $password);
  22. if (!$db) {
  23.     die('Not connected : ' . mysql_error());
  24. }
  25.  
  26. $dbname = "your database here";
  27.  
  28.           $db_select = mysql_select_db($dbname,$db);
  29.             if (!$db_select) {
  30.                 die("Database selection also failed miserably: " . mysql_error());
  31.             }
  32.  
  33.             $results = mysql_query("SELECT NaamFuif, GemeenteFuif, DatumFuif FROM tblfuiven");
  34.             while($row = mysql_fetch_array($results)) {
  35.             ?>
  36.                 <tr>
  37.                     <td><?php echo $row['NaamFuif']?></td>
  38.                     <td><?php echo $row['GemeenteFuif']?></td>
  39.                     <td><?php echo $row['DatumFuif']?></td>
  40.                 </tr>
  41.  
  42.             <?php
  43.             }
  44.             ?>  
  45.             </tbody>
  46.             </table>
  47. </body>
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement