diff --git a/index.php b/index.php
index c783c25..aef33ea 100644
--- a/index.php
+++ b/index.php
@@ -19,6 +19,25 @@ catch(PDOException $e)
echo $sql . "
" . $e->getMessage();
}
+
+// Versuch der Objektorientierung
+
+class Link{
+ public $name;
+ public $url;
+
+ public function __construct($newName, $newUrl){
+ $this->name = $newName;
+ $this->url = $newUrl;
+ }
+}
+
+$link1=new Link("therealblue.de", "https://therealblue.de");
+
+echo ''.$link1->name.'
';
+
+/* Alt vor Obejktorientierung
+
$url = 'https://therealblue.de';
$name = 'therealblue.de';
@@ -32,6 +51,6 @@ $sql = "SELECT * FROM link";
foreach ($pdo->query($sql) as $row) {
echo ''.$row['link_name'].'
';
}
-
+*/
?>
\ No newline at end of file