link seite

master
Helge 2022-01-13 00:20:50 +01:00
parent f742d5effd
commit 64dd4352d0
1 changed files with 21 additions and 21 deletions

View File

@ -1,20 +1,18 @@
<?php
include ('link_lib.php');
$db = new dbLinkHAndler();
?>
<html>
<head>
</head>
<main>
<body>
<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>
<?php
include ('link.php');
$db = new dbLinkHAndler();
if ($_POST["linkName"] != "" AND $_POST["linkUrl"] != "")
{
$link1=new Link($_POST["linkName"], $_POST["linkUrl"]);
@ -23,6 +21,8 @@ if ($_POST["linkName"] != "" AND $_POST["linkUrl"] != "")
foreach ($db->getListReverse() as $link)
{
echo '<a href="'.$link['link_url'].'" target="_blank">'.$link['link_name'].'</a><br>';
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>