Learning PHP and MySQL

Example 16-11 The posts.tpl template file defines how the postings appear on the page

{section  name=mysec  loop=$posts}
<a  href="view_post.php?post_id={$posts[mysec].post_id}">{$posts[mysec].title}</a>
by  <b>{$posts[mysec].first_name}  {$posts[mysec].last_name}</b>
from  the  <b>{$posts[mysec].category}</b>  category  at  <b>{$posts[mysec].posted}</b>.
<
br  />
{/section}
<br  />
Click to <a  href="modify_post.php?action=add">add</aa posting.<br  />

Posted by on 09/27 at 11:45 AM

Next entry: Example 16-12 The view_post.php script displays and a summary of its comments

Previous entry: Example 16-10 The posts.php script displays a listing of posts and their subjects

<< Back to main