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