Little trouble

Making a project

Page 1 of 1

6 Replies - 476 Views - Last Post: 21 May 2010 - 03:26 AM Rate Topic: -----

#1 Slus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 20-May 10

Little trouble

Posted 20 May 2010 - 06:49 PM

Hey guys! I heard you help out a lot so i decided to get some help

I'm currently making a website where I need to display some pictures along with some ratings at the bottom of that picture. Then the user can click on the "next button" and it dynamically loads another of those pictures with a whole new set of information assigned to that new picture. I know some of the coding will have to use AJAX (to dynamically load the images) but for now I am stuck.. I don't know where to start... can you guys help me a bit?

Thank you

Is This A Good Question/Topic? 0
  • +

Replies To: Little trouble

#2 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5313
  • View blog
  • Posts: 27,216
  • Joined: 10-May 07

Re: Little trouble

Posted 20 May 2010 - 06:56 PM

We help... most certainly. But you are not asking for help. Your stating the outline of the project.

I wouldn't bother using Ajax for this.

I would setup a database, holding the picture id number, & rating value, category, last voted date, creation date, & all kinds of other administrative values.

With PHP, gather a random image ID number, display the image, & when they vote, update the database values.
Was This Post Helpful? 0
  • +
  • -

#3 Slus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 20-May 10

Re: Little trouble

Posted 20 May 2010 - 07:09 PM

True true but thanks to you I noticed that I was skipping a step... I first need to build a sign-up and login script and the rest will be fairly simple.

Thanks
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5313
  • View blog
  • Posts: 27,216
  • Joined: 10-May 07

Re: Little trouble

Posted 20 May 2010 - 07:10 PM

Let us know how this progresses :)
Was This Post Helpful? 0
  • +
  • -

#5 Slus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 20-May 10

Re: Little trouble

Posted 20 May 2010 - 07:15 PM

Yes I will... I have another question though... lets say I want to make a user upload a picture.... I need to first assign a value to the picture in my database, upload the actual file on my server, create a link from that ID to the picture link and thats it right?
Was This Post Helpful? 0
  • +
  • -

#6 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5313
  • View blog
  • Posts: 27,216
  • Joined: 10-May 07

Re: Little trouble

Posted 20 May 2010 - 07:57 PM

Sounds about right.
Was This Post Helpful? 0
  • +
  • -

#7 Bladescope  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 71
  • Joined: 01-September 09

Re: Little trouble

Posted 21 May 2010 - 03:26 AM

View PostSlus, on 20 May 2010 - 06:15 PM, said:

Yes I will... I have another question though... lets say I want to make a user upload a picture.... I need to first assign a value to the picture in my database, upload the actual file on my server, create a link from that ID to the picture link and thats it right?

Some tips:
  • Use a seperate storage folder for uploaded pictures, you could even create subfolders for each user id that has successfully uploaded at least one photo, this would make it easy to get statstics like the total amount of space a certain user is taking up with their uploads.
  • Rename their filenames for organisational purposes.
  • Be sure to add restrictions for dimensions and size accordingly.
  • For the SQL table, it should contain the picture id, the picture URL (from the initial chosen upload directory), the user id as bare minimums.

I don't know how you're going to go about the rating system as there's multiple ways to do it. Good luck!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1