Jump to content

view images from mysql in php


kabucek1

Recommended Posts

I'm working on some php editing scripts and I want automate uploads of images, make live easier.

I want to store images in mysql and use php to upload images with some navigation menus, like Edit images. Images are in tables of .html for now,

here is example of image code:

 

<tr><td class="XSP_MAIN_PANEL"><h1 align="center"><img style="WIDTH: 550px; HEIGHT: 734px"

    title=""

    border="0"

    alt=""

    src="images/front-june.gif"><img style=

    "WIDTH: 550px; HEIGHT: 734px"

    title=""

    border="0"

    alt=""

    src="images/front2-june.gif"></h1>

 

I want to change the src to the query from database from mysql.

Is there an easy way to do it?

 

Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/163702-view-images-from-mysql-in-php/
Share on other sites

You do not want to the store the images themselves in the database as that will cause the database to become very large very quick.

 

What you want to do is use PHP to upload a file somewhere on the server and then you save the path to that file in your database.  Then when you make a database call you just reference that path in the IMG tag.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.