include("../nephi_obadiah.php"); $chapter_id=intval($_GET['id']); $sql="SELECT boma_chapters.id AS chapter_id, boma_chapters.story, boma_chapters.chapter, boma_chapters.header, boma_chapters.text, boma_stories.id AS story_id, boma_stories.name, boma_stories.title AS story_title FROM boma_chapters, boma_stories WHERE boma_chapters.story = boma_stories.id AND boma_chapters.id = $chapter_id"; $adventures_array = $db->queryRow($sql); extract($adventures_array); $title="Book of Mormon Adventures - $story_title - $header"; include("topnav.php"); echo "
$story_title - $header
\n"; echo "\n"; echo ""; include("endnav.php");".str_replace("\n","
\n",$text)."
"; $sql = "SELECT id, header FROM boma_chapters WHERE story = $story AND id = ".($chapter_id+1); $rs = $db->query($sql); if($rs->numRows()) { $chapters_array= $rs->fetchRow(); echo ""; } else echo "The End
"; echo "