i have a database consisting of part number, item name, price. i want to save the pictures in images folder. when i am showing the products data with the above fields i also want to show the picture of the same. i am saving the picture in jpg format with partnumber as its name, please guide me on how to do this. i made the page with the above fields. its working fine. but what about the picuter how can i show it next to the other data of that record.
3 replies to this topic
#1
Posted 15 August 2011 - 05:07 AM
|
|
|
#2
Posted 15 August 2011 - 01:41 PM
The two likely options are either
- Storing the image along with the other data, as a binary object (blob)
- or
- Storing the image path as a string along with the other data
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 15 August 2011 - 01:49 PM
Perhaps something like this?:
The Part's Picture: <img src="the_images_folder/<?php echo $part_number ?>.jpg">
#4
Posted 21 August 2011 - 12:59 PM
do you want to display the image from database or from a folder? if from the database, it's better to create a column for the path of the image, it means all you will get from the database is just the path where the image in, so that you can display it beside your other stuff dynamically. and you can use different images for different products.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









