Show sourcecode
The following files exists in this folder. Click to view.
webbserverprogrammering/exercises/ovn_db/ovn_db1/
ovn_db1b.php
13 lines ASCII Windows (CRLF)
<?php
require __DIR__ . '/../../../dbconnect.php';
$sql = "SELECT * FROM kompisar";
$stmt = $dbconn->prepare($sql);
$success = $stmt -> execute();
if ($success) {
$res = $stmt->fetch(PDO::FETCH_ASSOC);
foreach ($res as $item) {
echo htmlentities($item);
}
}