How to upload image with out refreshing page?

Discussion in 'PHP' started by mpchekuri, Dec 9, 2009.

  1. #1
    Can anyone tell me how to upload a image with out refreshing the page and crop or resize the image using php?
     
    mpchekuri, Dec 9, 2009 IP
  2. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #2
    http://swfupload.org/
    Use that to upload, and use gd functions or imagemagick to resize them to the size you desire
     
    JAY6390, Dec 9, 2009 IP
  3. aquilax

    aquilax Member

    Messages:
    126
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #3
    Or you can use iframe for the upload.
     
    aquilax, Dec 9, 2009 IP
  4. tguillea

    tguillea Active Member

    Messages:
    229
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #4
    iframe is an easy fix, I agree.

    If you don't want to frame, consider deploying AJAX to handle the actual uploading. Put in a nice little "loading" image and you're good to go. The only problem with PHP uploads is you can't give a progress bar :\
     
    tguillea, Dec 9, 2009 IP
  5. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #5
    mastermunj, Dec 9, 2009 IP
  6. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #6
    @teguillea - You can't actually upload with AJAX directly, it has to be done with iframes or flash
     
    JAY6390, Dec 9, 2009 IP