You are here: Re: [PHP] RE: Display picture from MySQL « PHP « IT news, forums, messages
Re: [PHP] RE: Display picture from MySQL

Posted by Miles Thompson on 07/07/05 17:35

See the >>>>>>> below.
You can't send ANYTHING before header()
Miles

At 10:09 AM 7/7/2005, Bagus Nugroho wrote:
>Hi,
>Firstly, thanks for your advise.
>But, it doesn't work if combine with text or if we need display more than
>one record.
>Here's my code :
>
><?php
> mysql_connect("localhost","root","password") or Die ("Failed to
> connect");
> mysql_select_db("intdata") or Die ("Failed to select databse");
> $res=mysql_query("SELECT * FROM main") or die("error again");
>
> while ($line = mysql_fetch_array($res)){
> >>>>>>>>>>>>>>>>> echo "Lot Info : $line[lotID]"; <<<<<<<<<< Comment
> this out and try it <<<<<<<<<<<<<<<<<<
> /*Send headers*/
> header("content-type: image/gif");
> echo $line[picture];
> echo "\n";
> }
>?>
>
>It was displayed several record from $line[lotID], the followed
>information like this :
>Cannot modify header information - headers already sent by
>and a picture if opened with notepad.
>
>What's wrong
>
>Agian, thanks in advance
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация