I have a WordPress site installed in a subfolder of my host and another php-based custom written CMS in the public_HTML. I'll like to fetch some data (a marquee text to be used on my WP theme header) from the php-based CMS to WordPress(note, the two sites have a different database). I already have a php code that fetch the data.
//test.php
<?php
include_once("admin/includes/config.php");
include_once("admin/includes/db.class.php");
$db = new DB; $db -> open();
$strScrollingText = '';
$db -> query("select * from anouncements where status = 1 order by id desc");
if ($db -> rows() > 0)
{
$strScrollingText .= '<MARQUEE scrolldelay="100". direction="left">';
while ($rs = $db -> rsset())
$strScrollingText .= stripslashes($rs['anouncement']) . ', ';
$strScrollingText .= '</MARQUEE>';
}
When the test.php file above is placed in my public_html directory and previewed from my browser, it outputs a marquee text from the database. Then i moved the file into my themes folder (of course, I adjusted the two include file path in test.php by prefixing it with ../../../../) and tried to include the test.php using include('test.php'); in my theme's header.php, but when I refreshed my homepage, it was blank. I even copied the content of test.php into the and removed the 'echo $strScrolling text; ' and placed it where i want it to appear but still the homepage was still blank. I also used the #include directive in my Themes functions.php but this made my whole WordPress crash( I had to go and edit the file through cpanel to restore my wp). I don't know where i'm doing this wrong and it's really frustrating and I need any help I can get. I would even appreciate if i can get this done using a plugin. Thanks.
<marquee>
element is obsolete.