Hi guys. I want to integrate an external bible script I downloaded (http://www.hotscripts.com/listing/bible-php-script/) into the content page of my existing website I am building for my church: http://maranatha.tv (click on BIBLIA).
I am using include() to insert the main bible’s index.php page, but nothing is displayed. I am calling this page from an included function content() in my website’s root index page; basically, this is the folder structure:
-
server root: contains index.php
and two main functions are called within this index page: menu() and content();
The content() makes a call to bible(). -
bible/__WINDOWS/index.php
Here’s bible() function:
[php]function bible(){
include(‘bible/__WINDOWS/index.php’);
echo ‘TEST’;//testing simple text
}[/php]
3) Here’s content()
[php]function content(){
// DETERMINE which page ID to USE in our query below ********************************************************************
if (!isset($_GET['jesusid'])) {
$pageid = '1';
} else {
$pageid = preg_replace('#[^0-9]#i', '', $_GET['jesusid']);} // filter everything but numbers for security(new)
//preg_replace($pattern, $replacement, $string);//preg_replace() Function structure
// Query the body section for the proper page
$query = mysql_query ("SELECT body_text,title,author FROM content WHERE id = '$pageid' LIMIT 1 ") or die (mysql_error());
while ($row = mysql_fetch_array($query)) {
echo ucwords($row['title']).'</span> por ';
echo '<b>'.$row['author']. '</b><br>';
echo $row['body_text'];
//ADD CONTACT FORM
if (ucwords($row['title'])=='Contacto') //use row title -- Capitalized word
echo '
<iframe src="contact/contact.html" width="445px" height="260" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=NO>
Your browser does not support iframes.
</iframe>';
//ADD BIBLE Iframe
if (ucwords($row['title'])=='Biblia') //use row title -- Capitalized word
{
bible();
}
//INSERT LIVESTREAM JW PLAYER
//ADD CONTACT FORM
if (ucwords($row['title'])=='Cultos')
{ //use row title -- Capitalized word
include ('envivo.php');
}
if ($pageid == 16) //use row title -- Capitalized word
{
include ('envivo.php');
}
}
}[/php]
I already installed the bible script, created the database, and is working on its own: http://maranatha.tv/bible/__WINDOWS/index.php
I tried inserting it using iframes but got frustrated because I couldn’t manage to have the iframe resize with content.
Can anybody throw some light as why the include doesn’t seem to display the contets from the bible script?
Thanks in adavance for your time.