10000 ) $page = 0; } $querycomm = "SELECT * FROM comments WHERE post_id = $id"; $result = execute_query($querycomm); if( mysql_num_rows($result) > 0 ) { while( $line = mysql_fetch_row($result) ) { $message.=""; } } else { $message.=""; //No comments on this post. } }*/ function getpost() { $postnum = 0; $vars = explode("/",$_SERVER['REQUEST_URI']); if(isset($_GET['post'])) { $postnum=$_GET['post']; } else if ( isset($vars[2]) ) { $postnum = intval($vars[2]); if( $postnum < 0 || $postnum > 10000 ) $postnum = 0; } else { echo( '
  • Error

    You\'ve reached this page incorrectly. Please return Home and follow a different link.

    \n\t
  • '); exit(0); } $query="SELECT * FROM posts WHERE id=$postnum"; $result=execute_query($query); if( mysql_num_rows($result) >0 ) { $line = mysql_fetch_row($result); $article = nl2br($line['3']); $post="
  • $line[4]

    ".nl2br($line[3])."

    \n\t
  • \n\n\n"; //$post.=doGenComments(); } else{exit(0);} echo( $post ); } ?>