With the above code, you are not running the query, rather, you are simply having the script echo out what is between the " ". You need to add more code to have the query run successfully.
I take it from the above coding you are not integrating this with vBulletin? If not, try the below.
PHP Code:
$server = "localhost";
$db_name = "dbname"
$user = "user";
$pass = "pass";
$getlogo = mysql_query("SELECT logo FROM logo");
while ($data = mysql_fetch_array($getlogo))
{
echo $data[logo]
}
That does run the query through a loop, though it should provide the desired effect. Alternatively, you may also swicth it to:
PHP Code:
$server = "localhost";
$db_name = "dbname"
$user = "user";
$pass = "pass";
$getlogo = mysql_query("SELECT * FROM logo");
while ($data = mysql_fetch_array($getlogo))
{
echo $data[logo]
}
With the above, you can call $data[logo] or $data[anythingelse] from the table.
If you were integrating this with vBulletin, you could just as well use the below and cut back on the coding:
PHP Code:
require_once("./global.php");
$getlogo = $db->query_read("SELECT * FROM logo");
while ($data = $db->fetch_array($getlogo))
{
echo $data[logo]
}