List,

I'm using the following code to retrieve image from Mysql. My problem is how
can I output another image if the given ID doesn't have an image on it??? I
had already inserted a blank gif in the database in order to use it, but
I've tried to check if ($resultado['Imagem_data'] == "") or  null and
outputs the blank gif, but didn't work.


    $conexao = new conexao();
    $query = new Query($conexao);
    $sql = "SELECT Imagem_data,Imagem_type FROM imagens WHERE
CelebID='$celebID'";
    $query->executa($sql);
    $resultado = $query->dados();
    $imagem_banco = $resultado['Imagem_data'];
    $type = $resultado['Imagem_type'];
    if($imagem_banco != "") {
        HEADER("Content-type: $type");
        echo($imagem_banco);
    }

Thank's

Rodrigo
-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to