professional-sql-10-public-files-fetch.php / php
<?php // include shared code include '../lib/common.php'; include '../lib/db.php'; // retrieve comments for this post _GET['post_id'];\ %sBLOG_COMMENT ' . 'WHERE POST_ID =\ %d ORDER BY COMMENT_DATE ASC', DB_TBL_PREFIX, id); query, result)) { while(result)) { echo '<p>' . htmlspecialchars(<br/>'; echo htmlspecialchars(row['PERSON_NAME']) . ' ' . date('m/d/Y', </p>'; } } else { echo '<p>There are no comments for this post.</p>'; } // form to add comments ?> <form action="post.php?id=<?php echo id; ?>" method="post" onsubmit="postComment(<?php echo <div> <label for="name_<?php echo id; ?>">Name: </label> <input type="text" name="person_name" id="name_<?php echo <br /> <label for="comment_<?php echo id; ?>">Comment: </label> <textarea type="text" name="post_comment" id="comment_<?php echo </textarea></br> <input type="submit" value="submit" /> </form> <?php mysql_free_result(result); mysql_close(
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.