Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-02-2012, 08:03 PM   PM User | #1
coder11001
New Coder

 
Join Date: Dec 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
coder11001 is an unknown quantity at this point
Exclamation php image profile help

okay, so I have created this website where someone will upload a picture, provide their name and email, and give the photograph a description. And everything is working just fine.

However, I would like after submitting their image for there to be a link provided to the uploader of their image and the description they gave of that image.

How would I do this?

Thank you very much!!!!!
coder11001 is offline   Reply With Quote
Old 02-03-2012, 02:52 AM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
Refer to this thread:
http://www.codingforums.com/showthread.php?t=250482

Let me know if you are putting images into the database or into a directory.

It appears you are dealing with the same kind of issue as that other thread.
mlseim is offline   Reply With Quote
Old 02-03-2012, 10:52 AM   PM User | #3
coder11001
New Coder

 
Join Date: Dec 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
coder11001 is an unknown quantity at this point
Quote:
Originally Posted by mlseim View Post
Refer to this thread:
http://www.codingforums.com/showthread.php?t=250482

Let me know if you are putting images into the database or into a directory.

It appears you are dealing with the same kind of issue as that other thread.
Hi, thank you for replying.
I'm using a directory not a database. I looked at the other thread you provided, but there doesn't appear to be a solution.
The image upload is working, and it places the file name into a column into the database called 'filename'. Images are located in the directory 'compare/images/'.
If there's anymore information I can provide, please let me know.


Edit: I just noticed your questions in the other thread, I'll answer them.

1) Stored in a directory
2) There are no users, but there is a name and email, and description the uploader must provide when uploading the image. The upload script I have inserts this information into the database into their respective fields. I would like the name, and the description to appear underneath the image that is being linked to
3) For now, it is okay that the images are in their original filenames
4) The person does not need to log in
5) The person cannot upload multiple images
6) I am using a mysql database, yes
7) I do not need to generate a thumbnail version of each image


Thanks again!

Last edited by coder11001; 02-03-2012 at 10:58 AM..
coder11001 is offline   Reply With Quote
Old 02-03-2012, 01:11 PM   PM User | #4
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
So in your case, you'll need a new column created in your database table ...
the new column that you create will contain the filename of the image.

You can all the new column -- image VARCHAR(20)

When a user id is queried, you'll be able to see the filename of the image they uploaded.

Then it's easy to just display the user's text under the image and do whatever you want.

The way you're doing it (in my opinion) is the best way.
Storing images (the binary image) in a table makes things more difficult.
mlseim is offline   Reply With Quote
Old 02-03-2012, 09:40 PM   PM User | #5
coder11001
New Coder

 
Join Date: Dec 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
coder11001 is an unknown quantity at this point
Quote:
Originally Posted by mlseim View Post
So in your case, you'll need a new column created in your database table ...
the new column that you create will contain the filename of the image.

You can all the new column -- image VARCHAR(20)

When a user id is queried, you'll be able to see the filename of the image they uploaded.

Then it's easy to just display the user's text under the image and do whatever you want.

The way you're doing it (in my opinion) is the best way.
Storing images (the binary image) in a table makes things more difficult.
How would I conduct a query, to echo a row, given just one field, such as the the user id or the username?

thanks.
coder11001 is offline   Reply With Quote
Old 02-03-2012, 10:38 PM   PM User | #6
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
SELECT * FROM tablename WHERE userid='123'

I don't know your tablenames, nor do I know your column names.

I suggest you use Google to find a free PHP/MySQL tutorial,
because there's more to it than just a query string.
mlseim is offline   Reply With Quote
Reply

Bookmarks

Tags
image, php, upload

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:29 AM.


Advertisement
Log in to turn off these ads.