0

So I'm making a website in PHP, and I've got the idea, that I would like to store both the HTML content of the pages and the content images in MYSQL. But as I was thinking about the implementation, I could not figure out a way to load the images to the HTML that I receive from the database. (The process would be: page request->retrieve HTML from db->retrieve the images in html from db and insert them)

I haven't find any solution by googling yet, so I'm wondering if there is a routine solution for this problem? Any ideas are welcomed! Thanks in advance!

traubisoda
  • 11
  • 1
  • 1
    This link will help you, http://stackoverflow.com/questions/7793009/how-to-retrieve-images-from-mysql-database-and-display-in-an-html-tag – anand kulkarni Apr 03 '15 at 09:00
  • just to be clear: you don't store HTML in your **data**base, you store DATA in **data**base. Unless you are a crawling engine of course and HTML is your data – Sharky Apr 03 '15 at 09:54
  • It's true... storying HTML in the database is often a mistake. It makes redesigning and sharing data very hard. I don't see the point in storing images in the database either. – Tony Gustafsson Apr 03 '15 at 09:57
  • I'm only storing the pages content html in the database (aka html formatted text with images). The image part is only for experimentation. – traubisoda Apr 03 '15 at 11:16

0 Answers0