Re: RE: Display picture from MySQL
| From: | Miles Thompson | Date: | Thu, 07 Jul 2005 14:35:13 +0000 |
| Subject: | Re: RE: Display picture from MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218294@lists.php.net to get a copy of this message | ||
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 : <?phpmysql_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)){this out and try it <<<<<<<<<<<<<<<<<<echo "Lot Info : $line[lotID]"; <<<<<<<<<< Comment/*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