Computer Science Canada

SSI.php help needed

Author:  Jonosss [ Mon Mar 21, 2005 11:13 pm ]
Post subject:  SSI.php help needed

hello im running an SMF forum
i need to modify some of the things that show in my SSI
but i dont know the right php commands
i want my banner to show in the ssi but i dont know what script to use to get the linked image to show without using a mysql database query because my database is recognizing my banner and i just want it show show an image the equivalent of the html
code:
<a href="xxx"><img scr="xxxx"></a>

within the ssi.php <?php> brackets

heres the relevant part of my code someone please help
code:
function ssi_banners()
{
        global $db_prefix;
        if (!allowedTo('can_see_banners'))
                return;
        $request = db_query("SELECT ID_BANNER, IMAGEURL, ALTTEXT, REDIRECT, WINDOW FROM {$db_prefix}banners WHERE ZONE = 'main' ORDER BY rand() LIMIT 1", __FILE__, __LINE__);
        list ($bid, $image, $alt, $url, $target) = mysql_fetch_row($request);
        if ($bid)
        echo '<a href="index.php?action=bandirect;id=' . $bid . '" target="' . $target . '"><img border="0" alt="' . $alt . '" src="' . $image . '"></a>';
        mysql_free_result($request);
}
?>


thanks,
jonosss


: