The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How To Display Stored Image Using Path? Reply To: How To Display Stored Image Using Path?


This is not necessarily true. There is absolutely nothing that ensures the two ids will stay in sync. You have the right idea -using the id to relate the two records- but one of them must not be auto-incrementing. One can be, but the other needs to be deliberately based on the first.

Store the session of the auto incrementing PK id from the form table into the id of the image table?

Don’t use * in your queries. At best, it gets confusing; at worst, it can lead to SQL errors (e.g., if you join two tables that have columns with the same names). It is far better to explicitly name each column you want, for example:


“Around” it? Are you trying to add a class to the image, or do you want to wrap the image in another element with a specific class?

Add a class to the image. Normally I would write :

<img src="images/banner.png" class="imgsize" alt="banner">

But within the php code that displays the images that doesn’t work.