Connecting to __daily_quotes__

Hi,

I'm creating an (x-cart) store (isexstore.net) to match the look of my dolphin site (isexclub.net) and want to display the same "daily quotes" at the bottom of store pages....

In the (x-cart) store (isexstore.net) database I created a "DailyQuotes" table, with the same quotes as on my Dolphin Site, how would I connect to the MySQL database to insert the quotes at the bottom of the page?

I tried inserting:

<div style="width: 955; margin-left: auto; margin-right: auto;" class="quotes_block">__daily_quotes__</div>


in the html at the bottom of the page, but it is not pulling the quotes from the database.

Thanks in advance for your help,
Blaine.

Thanks in Advance, Blaine
Quote · 27 Nov 2009

PHP-code:


$arr = db_arr("SELECT `Text`, `Author` FROM DailyQuotes ORDER BY RAND() LIMIT 1");

echo "
<table cellspacing=0 cellpadding=0>
<tr><td><i>{$arr['Text']}</i></td></tr>
<tr><td><b>{$arr['Author']}</b></td></tr>
</table>
";

if isexstore.net use another DB/db_username/db_password than isexclub.net you need maybe add this to the code to...

Quote · 28 Nov 2009

PHP-code:


$arr = db_arr("SELECT `Text`, `Author` FROM DailyQuotes ORDER BY RAND() LIMIT 1");

echo "
<table cellspacing=0 cellpadding=0>
<tr><td><i>{$arr['Text']}</i></td></tr>
<tr><td><b>{$arr['Author']}</b></td></tr>
</table>
";

if isexstore.net use another DB/db_username/db_password than isexclub.net you need maybe add this to the code to...

====================

...it is another database, so would the PHP-code look like this?

====================

PHP-code:


$arr = DB/db_username/db_password_arr("SELECT `Text`, `Author` FROM DailyQuotes ORDER BY RAND() LIMIT 1");

echo "
<table cellspacing=0 cellpadding=0>
<tr><td><i>{$arr['Text']}</i></td></tr>
<tr><td><b>{$arr['Author']}</b></td></tr>
</table>
";


Also, do I include "PHP-code:" when I paste it in the php text?

Thanks,
Blaine.

Thanks in Advance, Blaine
Quote · 29 Nov 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.