Results 1 to 4 of 4

Thread: How to improve PHP photo album script to upload photos?

  1. #1
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to improve PHP photo album script to upload photos?

    Hello,

    I like PHP photo album script and I'd like to use it on my website.

    My page has form where user enters some information about some place. I want to rebuild page to allow user insert photo(s) from him gallery.

    PHP photo album script will work fine with form, but how can I add "dynamic photo upload" feature to my page? I mean I can't reload page, so simple PHP will not work here, so I need some dynamic option.

    I want do the following. User chooses some image from his hard drive, adds name of the photo and clicks Upload button. PHP script (I know how to build this one) uploads, resizes and saves image. Then new image appears in user's photo gallery. But if I refresh page, user will loose entered data (texts, labels etc). How can I do this without refreshing page?

  2. #2
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have an idea to put image upload script to iframe, so the main page will not refresh after user will upload new image.

    The question is how can I refresh PHP Photo Album script from this iframe? I mean user will upload new image and PHP script that will be in iframe should call some JS function to refresh images. Is that possible?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It might be easiest to go ahead and refresh the page. The values that were already entered by the user could be forwarded to the refreshed page using javascript and/or PHP.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    It might be easiest to go ahead and refresh the page. The values that were already entered by the user could be forwarded to the refreshed page using javascript and/or PHP.
    I will try to use frames then. I think it will be more user friendly way.

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
  •