linkvz/index.php

11 lines
244 B
PHP
Raw Normal View History

2021-12-28 23:49:45 +01:00
<?php
2021-12-29 00:24:58 +01:00
$pdo = new PDO('mysql:host=localhost;dbname=links', 'linksdb', 'linksdb');
2021-12-28 23:49:45 +01:00
$sql = "SELECT * FROM link";
foreach ($pdo->query($sql) as $row) {
echo '<a href="'.$row['link_url'].'" target="_blank">'.$row['link_name'].'</a><br>';
}
?>