<?php
	echo "<p>Coucou</p>";
	$db = new PDO("sqlite:/etc/postfix/postfix.sqlite"); 
  $db -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

  try {

    $res = $db -> query('SELECT * FROM postfix_alias_vitruels;');


	print '<table>';
    foreach ($res as $row) {

      print '<tr><td>' . $row['courriel'] . '</td><td>' . $row['destination'] . '</td></tr>';

    }
    print '</table>';

  }
  catch(PDOException $e) {

    print ("exception " . $e->getMessage());
  
  }
?>