linkvz/index.php

29 lines
741 B
PHP
Raw Permalink Normal View History

2022-01-13 00:20:50 +01:00
<?php
include ('link_lib.php');
$db = new dbLinkHAndler();
?>
2022-01-09 23:50:09 +01:00
<html>
<head>
</head>
2022-01-13 00:20:50 +01:00
<body>
2022-01-09 23:50:09 +01:00
<form action="index.php" method="post">
Name: <input type="text" name="linkName"> URL: <input type="text" name="linkUrl"> <input type="Submit" value="Speichern">
</form>
2022-01-09 22:05:20 +01:00
2022-01-13 00:20:50 +01:00
<?php
if ($_POST["linkName"] != "" AND $_POST["linkUrl"] != "")
{
$link1=new Link($_POST["linkName"], $_POST["linkUrl"]);
$db->saveLink($link1);
}
2022-01-09 22:05:20 +01:00
2022-01-13 00:20:50 +01:00
foreach ($db->getListReverse() as $link)
{
echo '<a href="link.php?url='.$link['link_url'].'">'.$link['link_name'].'</a> - <a href="'.$link['link_url'].'" target="_blank">'.$link['link_url'].'</a><br>';
}
?>
</body>
</html>