Learning PHP and MySQL
Example 16-15 post_form.tpl
<form action="modify_post.php" method="POST">
<label>
Title: <input type="text" name="title" value="{$posts[mysec].title}">
</label>
<br /><br />
<label>
Body: <textarea name="body" cols="40" rows="4">{$posts[mysec].body}</textarea>
</label>
<input type="hidden" name="action" value="{$action}">
<input type="hidden" name="post_id" value="{$posts[mysec].post_id}"><br>
<label> Category:
{html_options name="category_id" options=$categories selected=$posts[mysec].category_id}
</label>
<br />
<input type="submit" name="submit" value="Post" />
</form>
{/section}
Posted by on 09/27 at 12:19 PM
Next entry: Example 16-16 modify_comment.php
Previous entry: Example 16-14 modify_posts.php