<html>
<head>
    <title>Keyja - Terms of service & Privacy policy</title>
</head>
<body>
<?php
    $con = pg_connect("host=localhost dbname=keyja user=postgres password=password")
           or die('Connectionion error : ' . pg_last_error());
    $sql = "select opt_tos from options";
    $result = pg_query($con, $sql);
    if (!$result) {
      echo "ERROR\n";
      exit;
    }
    
    while ($row = pg_fetch_row($result)) {
      echo str_replace("\n", "<br>", $row[0]);
    }
    
    pg_close($con);
?>
</body>