You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
960 B
PHTML
46 lines
960 B
PHTML
2 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<title></title>
|
||
|
<style>
|
||
|
@import url(style.css);
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1></h1>
|
||
|
|
||
|
<main>
|
||
|
<?php
|
||
|
$dir = 'sqlite:/home/jelkner/Data/phpliteadmin/alien_abductions.sqlite';
|
||
|
$dbh = new PDO($dir) or die("Cannot open the database");
|
||
|
$query = "SELECT * FROM Abductions";
|
||
|
foreach ($dbh->query($query) as $row)
|
||
|
{
|
||
|
echo $row[1];
|
||
|
}
|
||
|
$dbh = null; //This is how you close a PDO connection
|
||
|
?>
|
||
|
</main>
|
||
|
|
||
|
<footer id="vLinks">
|
||
|
</footer>
|
||
|
|
||
|
<script>
|
||
|
var loc = window.location.href;
|
||
|
|
||
|
var linkStr = '<a href="http://validator.w3.org/check?uri=';
|
||
|
linkStr += loc;
|
||
|
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
|
||
|
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
|
||
|
linkStr += loc;
|
||
|
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
|
||
|
console.log(linkStr);
|
||
|
|
||
|
var footer = document.getElementById("vLinks");
|
||
|
console.log(footer);
|
||
|
footer.innerHTML = linkStr;
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|