Jump to content

Anyone know if this can be done?


danny_woo

Recommended Posts

Hello People,

 

I have an idea to write some code to enable some friends and family to upload and download photo's from a part of my website.

 

What I would like to do is have about 6 registered members (all of whom know each other).

 

Once one of these members logs in, they will be able to see the other members photo albums and will have the option to download individual photo's or complete photo albums from the 5 other members. Lastly the logged in user will also have the option to upload their own photos to their own album for the other members to download if they wish to do so.

 

Now, I know there are plenty of Photo Sharing Websites and even some servers provide an almost similar service and all-in-all it would save me a great deal of time, and I'm sure a great deal of stress and frustration but I'm a stubborn bastard and I wish to do this project myself because:

 

1) I really need to improve on my PHP and

 

2) I want to keep this restricted and have complete control over everything.

 

3) Build a simple photo sharing site with no bells and whistles attached.

 

Now i know this can be done in many different ways, but what I would like to know from the PHP experts is what would be the best approach for me to start putting this together?

 

I've done a little digging around on the internet and what I'm thinking is to follow a tutorial Ive found, then once completed start modifying the code to suite my above requirements.

 

The tutorial i found was on youtube under the title:

 

How to make a PHP Upload system for your website (Part 1) (HD)

http://www.youtube.com/watch?v=SD2B-hDxw4M

 

The tutorial is in 3 parts. If anyone is interested in helping me on this project, please have a look at the tutorials and kindly let me know if this is the best place for me to start my project.

 

Many thanks in advance people.

 

PS, one thing i forgot to mention, but is kinda obvious is that each member would require a separate Username and Password. 

Link to comment
Share on other sites

The best way to start is to write a requirement specification document, where you list every detail of this project in a clear and concise manner. Once you've done that, you should have all of the logic covered and organized in a sensible manner. After that, writing the PHP code should be a breeze.

Also, you'll need to read up on security, especially input validation, output escaping and how to secure against malicious files in uploads (and CSRF, both incoming and outgoing).

Link to comment
Share on other sites

You said it yourself: "this can be done in many different ways". How I would approach a project may be completely different to how ChristianF approaches projects. Everyone can offer a method for tackling your problem/idea but its ultimately up to you.

 

If we were to discuss the best approach you'd quickly end up with pages of posts debating the best ways to go about completing the task in question.

 

If you want a starting point I'd recommend starting with the database and thinking about the entities (tables) and attributes (fields) you'll need. You start with the database because your code and its structure is dependent on it - to a degree. If you're using MySQL read up on normalisation - because MySQL is an RDBMS - through to the third form minimum and then consider your database structure (on paper). A bad database design will only cause mass amounts of problems when writing the application code.

 

After your database you need to ask yourself questions like "Am I going to program procedurally or object oriented?"; if OO "Am I going to look into design patterns?"; "What design pattern or general architecture am I going to use?". Then begin thinking about the structure of your application, whether its completely independent from your main website (possibly answered in your definition of the task). There's a mass array of questions that need answering and your question is far to open-ended and generalised for you to ever receive a full answer here.

 

Like you said in the beginning, this can be done in many different ways.

Link to comment
Share on other sites

Thanks for the replies guys.

 

You have got me thinking about this project in a whole different way now.

 

I think what I'm going to do is start with the database and have a clear thought-out plan about the tables and fields I'll need along with an overall general plan for the entire project.

 

Also I plan to get up to scratch on MySQL as I'm no expert in this area (this entire project is to get me learning a bit more about PHP and MySQL) so a bit of extra reading wont hurt.

 

Once things are underway and I start to run into php errors I'll keep coming back to you guys and PHP Freaks to hopefully point me in the right direction! ;)

 

Once again, many thanks for your input guys, if you have any more thoughts on this subject please post.

 

Cheers. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.