473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Finding and displaying an uploaded image file

hi

i am developing a small application, its basically a admin section where the admin can add/delete different items.

like if he wants to add a product he just fills the form which contains the fields related to products.
then the info obviously stored in db...
but what i want to do is when the admin wants to add the image of the product.. i want to display that image against the product info......

i am unable to do that........

i have written a file upload code but it only uploads the file to specific folder only.......

plz help me out

thanks
Jun 15 '07 #1
6 1406
nathj
938 Expert 512MB
hi

i am developing a small application, its basically a admin section where the admin can add/delete different items.

like if he wants to add a product he just fills the form which contains the fields related to products.
then the info obviously stored in db...
but what i want to do is when the admin wants to add the image of the product.. i want to display that image against the product info......

i am unable to do that........

i have written a file upload code but it only uploads the file to specific folder only.......

plz help me out

thanks
It would be really helpful to see some of the code you have in place. At what point do you wish to display the picture? Is the picture being loaded to the site and the URL stored in a database? What is the overview of how the system works?

I'm sure help is around if there's a little more info.

Nathan
Jun 15 '07 #2
thanks for the reply Nathan

i am using localhost. and all i want is that when i upload the image the image name also store in the database.

i havn't done anythibg regarding this coz i have no clue how it will be done.. so it will be very kinf of you to show me the right direction.


thanx
Jun 15 '07 #3
bonski
53
thanks for the reply Nathan

i am using localhost. and all i want is that when i upload the image the image name also store in the database.
hi there..
you said you want to store the image name also to the db, right?
on the upload script.. you should extract also the name of the image... using this for example..

$filename = $_FILES['image']['name'];

and store the data from the variable $filename to the table by INSERT SQL.. ok.

and for displaying.. just query from the table where your image name is.. and you can try this for example..

echo '<img src="'.$row['image_name'].'" alt="image"/>';

this is an html tag to show image, right..
and the variable $row[] is just an example when you use.. mysql_fetch_array()
and 'image_name' is just a field from the table.. just an example..

hope this can give you a little.. have nice day.. ^____-
Jun 15 '07 #4
thanx for help "bonski"

it works now,,, thanks a lot
Jun 15 '07 #5
bonski
53
^_________^... a big smile... my pleasure buddy...
Jun 15 '07 #6
pbmods
5,821 Expert 4TB
Changed thread title to better describe the problem.
Jun 15 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mark | last post by:
Hi all, I want to be able to resize an image that a user has uploaded. I have the image upload working as well as the image resize. When I go to delete the original uploaded file (I want to...
0
by: Satish Appasani | last post by:
Hi: I have a ASP.NET form with Web layout which I've achieved using panels. In one of the tab I have a File control to upload Images. When I put a file in the file control and move to another...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
0
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
1
by: monomaniac21 | last post by:
Hi im trying to get a chart to display using php. I get an error at the moment when i use the function (or any requiring an uploaded font to be used): imagettftext($image, 6, 0, 0,...
0
by: CR Developer | last post by:
Hi, I'm trying to displaying images stored in SQL Server 2000 into a Crystal Report 10. The images source is a jpeg, and the image is not displaying. If I upload a bmp file in the database, it...
8
by: ctiggerf | last post by:
I was hopeing someone could help me out here. Been stumped on this one all day. This function 1. Checks uploaded files. 2. Creates two resized images from each (a full size, and a...
14
by: =?Utf-8?B?U2FtdWVs?= | last post by:
Hi, I have a web app that allows others to upload files, and the problem is that if I allow users to upload image files, fake image can be uploaded and cause XSS issues. In the app, I do...
53
by: angelicdevil | last post by:
ok i have a folder made on the server and uploaded image files to it...the link to the image file or rather the path to the image is uploaded in the database in 'image_path' , now i want that the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.