Jump to content

Image Uploads


TonganNinja

Recommended Posts

Hi there, first off I would like to say I am fairly new to PHP so any dumbing down of answers is greatly appreciated :-[

 

Anyway, I am trying to form a page whereby people can upload images from their PC and have them displayed on the site, preferably in some sort of thumbnail grid array (say 4 by 4 or 5 by 5 etc). Once there, I am going to link them to the full size image, and I would like another function where people can add and read comment on that picture.

 

Disregarding the issues of moderation of content, would this be feasible, if so, and help would be greatly appreciated

 

Thank you in advance!

Link to comment
Share on other sites

thats not php. that's html. And yes, that's possible. Actually its quite basic html. <table> and <tr> and <td> tags, that's it

 

Yes I know that, but PHP comes in to pull off the pictures from the database, then create the table and cell content as the database is updated

Link to comment
Share on other sites

ok, so everytime you want to bring up the image gallery you would need to pull the information...this infomation would probably the URL to the images....this would be in an array (hopefully)....You would then look through the array...heres  a broken down process

open your html table(<table><tr>)

get array of images

count the num of elements in array

go through the elements of the array 1 by 1 keeping track of the count your on...

echo somehting like <td><a href='big.gif'<img src='small.gif'></a></td>

every 4th or 5th image echo </tr><tr> (this gives us that grid effect)

keep going...and when your done close your table </tr><table>

 

 

hope that kinda helps...you'll need to look into loops, 'for' or 'while'

 

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.