SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Nov 2012
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    PHP upload image and place image in li

    Hi guys,

    I have a website I put together for a photographer and I create a little jQuery gallery on the site that works quite simply when you add a new image it automatically creates a thumbnail image to go with it.

    Only problem is the client contacts me all the time wanting images added. I know I should have just used Wordpress when I first built the site.

    Anyway what I'm after is if someone could point me in the direction of a PHP tutorial that will show me how to create a image uploaded that when you upload the image it will automatically add that new image to a new li within the gallery and so on for as many images as the client wants to add.

    I'm sure this must probably be quite simple I just can't find the right tutorial for what I want.

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,394
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    Uploading images - is it that simple as the images will probably need resizing as you can not assume your cliant will do it before uploading! Will they be uploading multiple images.

    I assume your jQuery gallery uses a list of hardcoded images. You can use glob() to populate the list.

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2012
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for advice

  4. #4
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,394
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    If you search this forum for thumbnail you should find some examples - as I say I would add image resizing as the cliant is bound to try uploading images that will break your layout.

    I would have a go and if you have problems post your code here.

    glob() is good but can be tricky and you can format its output as a list. This means the list is automaticaly populated when the page is opened; just replace your list with the glob() php code.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •