Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('Smarty.class.php');
- include('Databas.php');
- $smarty = new Smarty;
- $db = Database();
- // Get URL parameters - not sure this way is the correct
- $firstname = isset($_GET["search"]) ? $_GET["search"] : "";
- // Load users with the given firstname from DB
- $users = $db->usersWithFirstname($firstname);
- // Assign data to smarty
- $smarty->assign('users',$users);
- // Display the template.
- $smarty->display('View.tpl');
- // Fetch only return the string and can be used as this:
- // $rendered = $smarty->fetch('View.tpl');
- // echo $rendered;
- ?>
Add Comment
Please, Sign In to add comment