Thankīs George. I will implement that.

----- Original Message -----
From: "George Nicolae" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 29, 2002 10:54 AM
Subject: Re: [PHP-WIN] Re: Showing a blob filed part II


> If this implementation work I think is a good way.
>
> --
>
>
> Best regards,
> George Nicolae
> IT Manager
> ___________________
> PaginiWeb.com  - Professional Web Design
> www.PaginiWeb.com
>
>
> "Waldemar Brand Neto" <[EMAIL PROTECTED]> wrote in message
> 006901c1ef7b$5580ba00$[EMAIL PROTECTED]">news:006901c1ef7b$5580ba00$[EMAIL PROTECTED]...
> > Dear George thankīs again but  I donīt know how to save the image in
> another
> > file. I tryed this way. But my question is: This is the best way to do
> that?
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > <html>
> > <head>
> >  <title>Upload.php</title>
> > </head>
> > <BODY BGCOLOR=#3366FF>
> > <CENTER>
> >    <?php
> >       echo "<FORM ENCTYPE=multipart/form-data ACTION=Upload1.php
> > METHOD=POST>";
> >          echo "<h1> Kompatscher & Cia Ltda </h1>";
> >          echo "<hr>";
> >          $con = mysql_connect("*************************) or die ("Erro
ao
> > conectar!");
> >          mysql_select_db("***********", $con) or die ("Erro ao
selecionar
> a
> > database!");
> >         $comando="SELECT
> > codigo,nome,material,temperatura,pressao,fluido,descricao,foto FROM
> cadgrupo
> > WHERE codigo=010";
> >         $res = mysql_query($comando,$con);
> >         $linha = mysql_fetch_array($res);
> >         echo "<TABLE ALIGN=CENTER>";
> >            echo "<tr>";
> >               echo "<td>";
> >               echo "Foto";
> >           echo "</td>";
> >           echo "<td>";
> >              $i= $linha['foto'] ;
> >             $num=rand(0,9999);
> >             $nome='temp'.$num.'.jpg';
> >             $myfile = fopen($nome,"w");
> >             $fp = fwrite($myfile,$i);
> >             fclose($myfile);
> >             $len=strlen($i);
> >             echo "<input type=image src=$nome border=0>";
> >           echo "</td>";
> >          echo "</tr>";
> >    echo "</TABLE>";
> >    mysql_close($con);
> >    ?>
> >    </FORM>
> > </CENTER>
> > </BODY>
> > </html>
> > ----- Original Message -----
> > From: "George Nicolae" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, April 27, 2002 2:10 PM
> > Subject: [PHP-WIN] Re: Showing a blob filed part II
> >
> >
> > > My mistake. The correct code is:
> > > "<input type=image src=image.php border=0>";
> > >
> > > --
> > >
> > >
> > > Best regards,
> > > George Nicolae
> > > IT Manager
> > > ___________________
> > > PaginiWeb.com  - Professional Web Design
> > > www.PaginiWeb.com
> > >
> > >
> > > "George Nicolae" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > try to echo $i  in a separate file (lets say image.php) and in the
> main
> > > file
> > > > do
> > > > echo "<input type=image src=".image.php." border=0>";
> > > >
> > > > --
> > > >
> > > >
> > > > Best regards,
> > > > George Nicolae
> > > > IT Manager
> > > > ___________________
> > > > PaginiWeb.com  - Professional Web Design
> > > > www.PaginiWeb.com
> > > >
> > > >
> > > > "Waldemar Brand Neto" <[EMAIL PROTECTED]> wrote in message
> > > > 005f01c1edf9$7ca7dce0$[EMAIL PROTECTED]">news:005f01c1edf9$7ca7dce0$[EMAIL PROTECTED]...
> > > > Thank you for the help. I put the header in the top ot the document
> and
> > > now
> > > > it works.
> > > > I need one more tip. The result is not the image itself, but the
> content
> > > of
> > > > the Blob Field, how can I fix that?
> > > >
> > > > Thanks.
> > > > Waldemar
> > > >  The source code:
> > > > <?php
> > > > header("Content-type: image/jpeg");
> > > > header("Content-Disposition: inline; filename=temp.jpg");
> > > > ?>
> > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > > > <html>
> > > > <head>
> > > > <title>Teste.php</title>
> > > > </head>
> > > > <BODY BGCOLOR=#3366FF>
> > > > <CENTER>
> > > > <FORM>
> > > > <h1> Kompatscher & Cia Ltda </h1>
> > > > <hr>
> > > > <?php
> > > > $con = mysql_connect("**************************) or die ("Erro ao
> > > > conectar!");
> > > > mysql_select_db("***********", $con) or die ("Erro ao selecionar a
> > > > database!");
> > > > $comando="SELECT
> > > > codigo,nome,material,temperatura,pressao,fluido,descricao,foto FROM
> > > cadgrupo
> > > > WHERE codigo=010";
> > > > $res = mysql_query($comando,$con);
> > > > $linha = mysql_fetch_array($res);
> > > > echo "<TABLE ALIGN=CENTER>";
> > > > echo "<tr>";
> > > > echo "<td>";
> > > > echo "Foto";
> > > > echo "</td>";
> > > > echo "<td>";
> > > > $i= $linha['foto'] ;
> > > > echo "<input type=image src=$i border=0>";
> > > > echo "</td>";
> > > > echo "</tr>";
> > > > echo "</TABLE>";
> > > > mysql_close($con);
> > > > ?>
> > > > </FORM>
> > > > </CENTER>
> > > > </BODY>
> > > > </html>
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to