mysql - php photo not retrived correctlly from Database(sql) -
i trying retrieve products photo in displayed in format
�����z@y��oez�;���fп����9 ���*mȷ^����oٴi_�u6j9��+�`��fk�9ג�>.g����8�۰)��(�{c\xw q_�zj��4q"h�ݭinzzmvir�o����p��]~d�w��h���抴' ��ݍ�~�_q�\���?]z�&1��]���y+i�]�f��4fxo�z���m'��s��=.�==y�^=�;����zc��9��6ez�̾�|s� �:�d����y6u�*�j�v�,��}9����`�yu.���/fgbǵ�b�\si��������y���\���g��:];r���Ҿ<{'���Ϫmw�ӽ%��q��f=.������¹��y�����.�!���5��r�>��nߌ�c�~܅|_���t���oqѹo&��zx���?
can convert or in right format? how retrieve photo database
while ($row = mysql_fetch_object($qry_result)) { // each row returned query echo individual columns table for($i = 0; $i < 30; ){ if(!(($i++) % 3)){ <img src='.$row->product_photo.' alt="" />
you need create url retrieve image:
<img src='//mysite.com/photos.php?id=myphoto' alt="" />
then in photos.php script have code:
while ($row = mysql_fetch_object($qry_result)) { header("content-type: application/jpeg"); //or whatever type echo $row[0]->product_photo;
you'll need adapt needs. but, can't load binary data in src attribute.
Comments
Post a Comment