Hi!!
I'm working PHP and MySQL. JPG's images are being stored in this db (blob field). I need to know how to show them in a PHP page.
I access well to db.
My problem begins when I try to access data in "Image" field: I have built an index.php which calls image.php (echo("<img src='image.php'>", but image.php doesn't work.
I've got ASP code, and works well, but I need to translate to PHP (ASP aaaarg!)
This is a portion of the ASP code:
Set lFieldImage = rs.Fields("Fotografia"
Response.ContentType = rs.Fields("image/jpg"
lSize = lFieldImagen.ActualSize
lread = 0
Do While lSize > lRead
Response.BinaryWrite lFieldImage.GetChunk(2000)
lRead = lRead + 2000
Loop
Response.End
Thanks!!
I'm working PHP and MySQL. JPG's images are being stored in this db (blob field). I need to know how to show them in a PHP page.
I access well to db.
My problem begins when I try to access data in "Image" field: I have built an index.php which calls image.php (echo("<img src='image.php'>", but image.php doesn't work.
I've got ASP code, and works well, but I need to translate to PHP (ASP aaaarg!)
This is a portion of the ASP code:
Set lFieldImage = rs.Fields("Fotografia"
Response.ContentType = rs.Fields("image/jpg"
lSize = lFieldImagen.ActualSize
lread = 0
Do While lSize > lRead
Response.BinaryWrite lFieldImage.GetChunk(2000)
lRead = lRead + 2000
Loop
Response.End
Thanks!!