PHP Image Upload?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
JayGeePee
Forum Newbie
Posts: 6
Joined: Sun Jun 07, 2009 11:37 pm

PHP Image Upload?

Post by JayGeePee »

I am trying to figure out how I can allow my members to upload a picture from the members area that will show up in a certain area of a page.
My members have a duplicated version of my website, with there own referral URL - Like a affiliate website, for example: http://www.mysite.com, and there site: http://www.mysite.com/referral-IDThereName.php. I was wondering if I could allow them to upload a image to there referral URL page from the members area, along with text such as there name, etc. I'm looking to do strictly gif, or jpeg for security reasons. I was wondering if someone could help me out or point me to something like what I'm talking about.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP Image Upload?

Post by jackpf »

JayGeePee
Forum Newbie
Posts: 6
Joined: Sun Jun 07, 2009 11:37 pm

Re: PHP Image Upload?

Post by JayGeePee »

Yeah I searched Google, but couldnt get a strait answer. What i'm looking for is like myspace. You upload your image and it shows up on your page.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP Image Upload?

Post by jackpf »

Well, I suggest you read one of those upload tutorials.

Then, you can rename the image to the person's username, or userid or whatever.

Then, on their profile, check if an image with their username exists, if so, display it.

However, if you want to allow multiple photos, you should probably use a database to store which picture is whose, and the filenames etc.

Tbh, I'd personally use a database from the offset. But if you're looking for something simple, the former should suffice.
Post Reply