Hi,
I have written php code to retrive the image from mysql and display it on the webpage. Here is the code
<?php
require_once("D BConnect.php");
$gotten = @mysql_query("s elect user_photo from User_Info_Other where user_id = '1'");
header("Content-type: image/gif");
while ($row = mysql_fetch_arr ay($gotten))
{
print $row['user_photo'];
}
?>
This works fine when I don't add any html tags and displays the image, but when I add html tags i get the warning and prints the encrypted data.
Warning: Cannot modify header information - headers already sent by (output started at /var/www/kilorie/kil_ver3/list.php:2) in /var/www/kilorie/kil_ver3/list.php on line 6
According to what I know is, this error occurs when there are white spaces before and after the opening and closing php tags, but for my application I need to add html and css codes.
How to solve this issue. Can anyone please help me.
With regards
I have written php code to retrive the image from mysql and display it on the webpage. Here is the code
<?php
require_once("D BConnect.php");
$gotten = @mysql_query("s elect user_photo from User_Info_Other where user_id = '1'");
header("Content-type: image/gif");
while ($row = mysql_fetch_arr ay($gotten))
{
print $row['user_photo'];
}
?>
This works fine when I don't add any html tags and displays the image, but when I add html tags i get the warning and prints the encrypted data.
Warning: Cannot modify header information - headers already sent by (output started at /var/www/kilorie/kil_ver3/list.php:2) in /var/www/kilorie/kil_ver3/list.php on line 6
According to what I know is, this error occurs when there are white spaces before and after the opening and closing php tags, but for my application I need to add html and css codes.
How to solve this issue. Can anyone please help me.
With regards
Comment