I'm making a blog as a school project and is a bit stuck.
One of the requirements for the project is to use smarty, and this is totally new to me.
My problem is that I want to assign the "blog-posts" from my database to smarty variables. My approach is like this:
<?php
require_once('connect_db.php');
$result = $db->query("SELECT * FROM Innlegg");
while ($row = $result->fetch_assoc())
{print ("<h1>" . $row["forfatter"] . "</h1>");
print ($row["innhold"]);}
?>
Now i just print out "forfatter" from "Innlegg". How is this done by using smarty?